-
-
Save marrub--/bb6481e855024d328f5d159c3a5e8add to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pcode nop 0 | |
.pcode terminate 1 | |
.pcode suspend 2 | |
.pcode push 3 | |
.pcode add 14 | |
.pcode sub 15 | |
.pcode mul 16 | |
.pcode div 17 | |
.pcode mod 18 | |
.pcode eq 19 | |
.pcode ne 20 | |
.pcode lt 21 | |
.pcode gt 22 | |
.pcode le 23 | |
.pcode ge 24 | |
.pcode goto 52 | |
.pcode pop 53 | |
.pcode delaystk 55 | |
.pcode delay 56 | |
.pcode printbeg 85 | |
.pcode printend 86 | |
.pcode printstr 87 | |
.pcode printnum 88 | |
.pcode printchr 89 | |
.pcode fixedmul 136 | |
.pcode fixeddiv 137 | |
.pcode pushb 167 | |
.pcode pushbn 175 | |
.pcode pushb2 176 | |
.pcode pushb3 177 | |
.pcode pushb4 178 | |
.pcode pushb5 179 | |
.pcode call 203 | |
.pcode calld 204 | |
.pcode retv 205 | |
.pcode ret 206 | |
.pcode dup 216 | |
.pcode swap 217 | |
.module "a" | |
.globlfunc "myfunc" myfunclabel 0 | |
.globlscript 1 myscript2 0 ENTER | |
.globlscript "myscript" myscript 0 NET CLIENTSIDE | |
.globlstring "test string 1 (no name)" | |
.globlstring "test string 2 (named)" mystring | |
;; extra data to put in code block, blkb = bytes, blkw = words | |
.blkb 0, 1, 2, 3, 4, 5 | |
.blkb 6 | |
.blkb 7, 8 | |
.blkw 9, 10 | |
.blkw 11 | |
myfunclabel: | |
nop | |
printbeg | |
;; print 0x100 + 0x50 (336) | |
push #0x100 | |
push #0x50 | |
add | |
printnum | |
;; newline | |
push #'\n' | |
printchr | |
;; print string labeled 'mystring' | |
push #mystring | |
printstr | |
;; newline | |
push #'\n' | |
printchr | |
;; print string 0 | |
push #0 | |
printstr | |
printend | |
retv | |
myscript: | |
;; call by function label | |
calld &"myfunc" | |
terminate | |
myscript2: | |
push #0x50 | |
push #0x50 | |
add | |
printbeg | |
printnum | |
printend | |
terminate | |
;; EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment