LF: WHAT THE?!?!?!?
[Prev][Next][Index][Thread]
LF: WHAT THE?!?!?!?
OK, guys, what's goin on here? I am learning to program, and very VERY
carefully put together the program below. It is a practice program
which waits for a keypress, displays the number returned, and loops.
Upon running FARGO.BAT (By typing FARGO KEYCODE), it gave the following
errors:
^ Undefined Symbol (for JSRs to flib and romlib)
^ No such op-code (for add_library, and 'prog_code' in first line)
^ END statement is missing
Now, I know I put the END statement in there. Look for yourself!
I commented the whole thing for my own benefit, but I suppose it might
help.
;-------------BEGIN PROGRAM-----------
@program prog_code,prog_name
prog_code
MOVE.W #4,-(A7) ; push set_font param
JSR romlib[set_font] ; set font
ADD.W #2,A7 ; clear stack
JSR flib[clr_scr] ; clear screen
JSR flib[idle_loop] ; wait for key
LOOP: ; label
CMP.W #264,D0 ; check if key was ESC
BEQ Exit ; if it was then goto label Exit
MOVE.W #4,-(A7) ; push font style
MOVE.W D0,-(A7) ; push text
MOVE.W #0,-(A7) ; push x loc
MOVE.W #0,-(A7) ; push y loc
JSR romlib[puttext] ; display text
ADD.W #8,A7 ; clear stack
JSR flib[idle_loop] ; wait for key
JSR flib[clr_scr] ; clear screen
BRA LOOP ; goto label LOOP
Exit: ; label
RTS ; end of prog
prog_name ; declare string for comment line
DC.B "Key Code Generator",0
reloc_open ; include libraries flib and romlib
add_library romlib
add_library flib
reloc_close
END ; see? it really is there!!
;----------END OF PROGRAM----------
So what's wrong?
NOTE TO SHAWN WALKER--
I HAVE CHANGED THIS SLIGHTLY FROM WHAT I SENT TO YOU YESTERDAY
PS. Does anyone know why PCs use Line feeds (ASCII 10) and Macs use
carriage returns (ASCII 13)? it's really annoying when transferring
text...pc-to-mac gives unknown characters, mac-to-pc gives everything on
1 line. I use a Mac, but have to transfer to PC for compiling, so,
well, ya know...
--
Jake Robb
Follow-Ups: