A89: In need of bug hunting help...
[Prev][Next][Index][Thread]
A89: In need of bug hunting help...
I'm trying to write a program, and the first part I wrote is giving my
problems. I can't find the problem, and any help would be appreciated.
It's probably some stupid newbie mistake. Oh well, here we go...
Note: The rest of the program was deleted to save space.
I can't figure out why this code works:
draw_rows
clr.w d0
move.l #$2000,a6
move.w #0,d4
move.w #0,d5
move.b #4,d6
bsr view_file_draw_char_row
rts
But, this refuses to work, and keeps drawing characters to the screen
forever:
draw_rows
clr.w d0
move.l #$2000,a6
move.w #0,d4
move.w #0,d5
move.b #4,d6
bsr view_file_draw_char_row
clr.w d0
move.l #$2000,a6
move.w #0,d4
move.w #0,d5
move.b #4,d6
bsr view_file_draw_char_row
rts
This is the rest of the code:
;inputs: d4=x, d5=y, d6=char_num+1
view_file_draw_char_row
move.b (a6)+,d0
move.w #4,-(a7) ;color #4 : black on white
move.w d0,-(a7) ;character
move.w d5,-(a7) ;y coord
move.w d4,-(a7) ;x coord
jsr _ROM_CALL_1A4 ;DrawChar
lea 8(a7),a7 ;restore stack
addq.w #6,d4 ;move cursor
dbra.b d6,view_file_draw_char_row ;repeat if 5 characters have been drawn
rts
Any help would be appreciated. Thanks
-John
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com