Files
vt1200/dwt/visual/ret_test.asm
T

20 lines
681 B
NASM

; ret_test.asm -- smallest payload that proves `jump` is a real call.
;
; It writes two marker words and returns with `rets`. If the rdebug `jump`
; stub really used `call`, control comes back to the dispatcher and the TCP
; session stays usable; if it used a plain jump, there is no return address and
; this would fault or wander.
;
; Linked at bit 01840000h (byte 00308000h) by dwt/visual/build.sh.
.text
_start:
setf 16, 0, 0 ; field 0 = 16 bits, zero-extended
setf 32, 0, 1 ; field 1 = 32 bits, zero-extended
movi 0C0DEh, a0, L
move a0, @01850000h, 0 ; MARK1 = C0DE
movi 0B007h, a0, L
move a0, @01850010h, 0 ; MARK2 = B007 (proves the second store ran)
rets
.end