A85: 2 questions
[Prev][Next][Index][Thread]
A85: 2 questions
I have been studying the source for Tim FitzRandolf's "Weave" to help me learn
asm programming...so far everything seems easy except now I am stuck on a
certain spot:
KeyTest:
ld a,0
out (1),a
in a,(1)
cp 0 ;no keys pressed?
ret z ;nope. back to game.
bit 6,a ;EXIT (among others) pressed?
push af
CALL_Z(QUIT) ;yep.
pop af
bit 1,a ;LEFT (among others) pressed?
push af
CALL_Z(moveleft);yep.
pop af
bit 2,a ;RIGHT (among.. you get the idea.)
push af
CALL_Z(moveright)
pop af
ret
I'm a little confused as to how this works... Don't you use "call_getkey" in
order to cp the last key. Also the first few lines do not make too much sense
to me. What does "in" do and how come he switches from the graphics rom page
(if that is what it does). And if so what page is it switched to.
2nd question:
What is the difference between using cursor_row/cursor_col than
cursor_x/cursor_y?
Actually I have a third question too. What would be the best game source
codes for a beginner study for them to learn asm programming.
-thanks-
Steven