A89: help with assembly
[Prev][Next][Index][Thread]
A89: help with assembly
I am trying to write some routines using a68K. However I am haveing trouble
making jumps and stuff. Specifically the code:
even
get_string_stack:
;;;;;;;;;;;;
;
;Function ti take a string off the stack and return it
; to the memory location pointed to by (a2)
; -> string must be 14 chars long
; a6 is volatile
;;;;;;;;;;;;;;
move.l (a7)+,a6
move.w #8,d1
loop_strng:
sub.w #1,d1
beq return(PC);
move.w (SP)+,(a2)+
jmp loop_strng(PC)
even
return:
move.l a6,-(SP)
rts
will work fine, only it immediately jumps to the rts stamtement and
bypasses
move.l a6,-(SP).
I can get around this by putting a buch of nops after the
return:
label, but I would like to know why the assembler is not calculating jumps
correctly.
I am running and debuggin the code under vti 2.5 a4
Thank you very much for any help someone could give
Thanks, Harry
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Follow-Ups: