mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-26 04:01:44 +00:00
Add addressing mode check for JSR, and a test.
This commit is contained in:
@@ -4,9 +4,13 @@
|
||||
; JMP Rx is not allowed, all other modes are.
|
||||
;
|
||||
|
||||
start: jmp end
|
||||
start: jmp label ; rel(pc) jumps to label
|
||||
jmp @label ; @rel(pc) does something else!
|
||||
jmp #label ; (pc)+ does something else!
|
||||
jmp @#label ; @(pc)+ jumps to label
|
||||
|
||||
jmp r1 ; must fail
|
||||
jmp (r1)
|
||||
jmp (r2)
|
||||
jmp (r1)+
|
||||
jmp @(r1)+
|
||||
jmp -(r1)
|
||||
@@ -14,4 +18,18 @@ start: jmp end
|
||||
jmp 1234(r1)
|
||||
jmp @1234(r1)
|
||||
|
||||
end:
|
||||
secnd: jsr r0,label ; rel(pc) jumps to label
|
||||
jsr r0,@label ; @rel(pc) does something else!
|
||||
jsr r0,#label ; (pc)+ does something else!
|
||||
jsr r0,@#label ; @(pc)+ jumps to label
|
||||
|
||||
jsr r2,r1 ; must fail
|
||||
jsr r3,(r2)
|
||||
jsr r4,(r1)+
|
||||
jsr r5,@(r1)+
|
||||
jsr r2,-(r1)
|
||||
jsr r3,@-(r1)
|
||||
jsr r4,1234(r1)
|
||||
jsr r5,@1234(r1)
|
||||
|
||||
label: rts pc
|
||||
|
||||
Reference in New Issue
Block a user