abc
This commit is contained in:
28
programs/prog02.asm
Normal file
28
programs/prog02.asm
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// prog02.asm -- call/ret with args, but without ret value
|
||||
//
|
||||
|
||||
asf 3
|
||||
pushc 11
|
||||
pushc 33
|
||||
call proc
|
||||
drop 2
|
||||
rsf
|
||||
halt
|
||||
|
||||
proc:
|
||||
asf 2
|
||||
pushl -4
|
||||
wrint
|
||||
pushc '\n'
|
||||
wrchr
|
||||
pushc 22
|
||||
wrint
|
||||
pushc '\n'
|
||||
wrchr
|
||||
pushl -3
|
||||
wrint
|
||||
pushc '\n'
|
||||
wrchr
|
||||
rsf
|
||||
ret
|
||||
BIN
programs/prog02.bin
Normal file
BIN
programs/prog02.bin
Normal file
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@
|
||||
halt
|
||||
|
||||
proc:
|
||||
asf 0
|
||||
asf 1
|
||||
pushc '\n'
|
||||
wrchr
|
||||
rsf
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user