njvm/programs/prog5.asm
Elias Bennour 4994bd6071 add call and ret function
add drop (idk if it is working right)
add prog5 and prog6
2023-12-07 03:01:24 +01:00

36 lines
307 B
NASM

//
// prog01.asm -- call/ret without args, and without ret value
//
asf 3
pushc 11
wrint
pushc '\n'
wrchr
call proc
pushc 44
wrint
pushc '\n'
wrchr
rsf
halt
proc:
asf 2
pushc 22
wrint
pushc '\n'
wrchr
call proctwo
rsf
ret
proctwo:
asf 2
pushc 33
wrint
pushc '\n'
wrchr
rsf
ret