diff --git a/examples/instruction-test.asm b/examples/instruction-test.asm index bd31c68..cb3751b 100644 --- a/examples/instruction-test.asm +++ b/examples/instruction-test.asm @@ -22,24 +22,15 @@ main: dup.byte 1 dup.hword 2 dup.word 3 - malloc.byte 1 - malloc.hword 2 - malloc.word 3 - malloc.stack.byte - malloc.stack.hword - malloc.stack.word - mset.byte 1 - mset.hword 2 - mset.word 3 - mset.stack.byte - mset.stack.hword - mset.stack.word - mget.byte 1 - mget.hword 2 - mget.word 3 - mget.stack.byte - mget.stack.hword - mget.stack.word + malloc.byte + malloc.hword + malloc.word + mset.byte + mset.hword + mset.word + mget.byte + mget.hword + mget.word not.byte not.hword not.word diff --git a/examples/memory-print.asm b/examples/memory-print.asm index cebd6e7..2ff88ca 100644 --- a/examples/memory-print.asm +++ b/examples/memory-print.asm @@ -5,18 +5,25 @@ global main main: ;; Allocate a buffer of 3 characters - malloc.byte 3 + push.word 3 + malloc.byte mov.word 0 ;; Setup the buffer to be equivalent to "abc" push.reg.word 0 push.byte 'a' - mset.byte 0 + push.word 0 + ;; mset 0 'a' + mset.byte push.reg.word 0 push.byte 'b' - mset.byte 1 + push.word 1 + ;; mset 1 'b' + mset.byte push.reg.word 0 push.byte 'c' - mset.byte 2 + push.word 2 + ;; mset 2 'c' + mset.byte ;; Save buffer to W[8] because the first 8 registers should be ;; reserved for library routines as it may be overwritten @@ -41,7 +48,7 @@ print_cptr: loopback: push.reg.word 0 push.reg.word 1 - mget.stack.byte + mget.byte print.char ;; I += 1