[Featured][Dev] Wizards
Moderator: MaxCoderz Staff
-
- Extreme Poster
- Posts: 322
- Joined: Tue 15 Feb, 2005 12:08 am
- Location: Lost in a land of mysteries.....
Really nice!!
Join me at:
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
http://nanotech.pcriot.com
or
http://emancipal.co.nr
Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
-
- New Member
- Posts: 9
- Joined: Thu 30 Jun, 2005 1:14 am
- Location: OH,USA
- Contact:
Sorry for the post delay, I had not much time to program until now - but I need help in my Program. The one who can help me gets his name in the credits...
Problem:
I search for a routine which counts numbers in an array.
The array ends with ",255" ( Array: .db 0,1,2,3,4,0,1,8,5,2,255 ).
Inputs should be hl = pointer to the array and a = number to search.
Output should be a = amount of searched numbers in the array.
Thanks for HELP !!!
Problem:
I search for a routine which counts numbers in an array.
The array ends with ",255" ( Array: .db 0,1,2,3,4,0,1,8,5,2,255 ).
Inputs should be hl = pointer to the array and a = number to search.
Output should be a = amount of searched numbers in the array.
Thanks for HELP !!!
Revolution Software
-
- Regular Member
- Posts: 86
- Joined: Fri 17 Dec, 2004 8:20 pm
- Contact:
Code: Select all
count:
ld bc,$FF00 ;b=255 c=0
ld d,a ;save value to find
loop:
ld a,(hl)
inc hl
cp b
ret z ;end if #=255
cp d
jr nz,loop ;don't inc if !=d
inc c
jr loop
Erm... wasnt very difficult I think - but thank you. If you would plz say me your real name for the credits entry?
My Upload-server doesn't work in the moment so you must wait to see the screenshots.
Another problem is that "pic_z80.exe" doesn't work any more... I dont know why. But when I start it the msg: "unexpected error" comes up... ô.O
My Upload-server doesn't work in the moment so you must wait to see the screenshots.
Another problem is that "pic_z80.exe" doesn't work any more... I dont know why. But when I start it the msg: "unexpected error" comes up... ô.O
Revolution Software
-
- Maxcoderz Staff
- Posts: 791
- Joined: Fri 17 Dec, 2004 5:33 pm
- Location: On the dark side of the moon.
- Contact:
You we're able to make a good looking game like that but can't code such a simple routine?NanoWar wrote:Erm... wasnt very difficult I think - but thank you. If you would plz say me your real name for the credits entry?
My Upload-server doesn't work in the moment so you must wait to see the screenshots.
Another problem is that "pic_z80.exe" doesn't work any more... I dont know why. But when I start it the msg: "unexpected error" comes up... ô.O
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
Right.
No not really: I coded a similar routine before, but it didnt work. so i decided to aks someone around here. This routine was very easy I know, but everyone knows these days when nothing wants to work. This was mine.
To not feel disappointed you will see n1ce screenshots (if the upload server works) - tomorrow!
At the 7th august I will start the short travel (1year) to netherland - so dont wonder where I am. If all goes right I will be able to finish WIZARDS there.
In hope,
NanoWar
No not really: I coded a similar routine before, but it didnt work. so i decided to aks someone around here. This routine was very easy I know, but everyone knows these days when nothing wants to work. This was mine.
To not feel disappointed you will see n1ce screenshots (if the upload server works) - tomorrow!
At the 7th august I will start the short travel (1year) to netherland - so dont wonder where I am. If all goes right I will be able to finish WIZARDS there.
In hope,
NanoWar
Revolution Software