Remove dollar sign ($) from front of number tokens

Number tokens with a dollar sign are kind of cumbersome and don't really
serve a purpose, so I'm removing them.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-03-10 15:59:36 -04:00
parent 7c9d4fe908
commit 28edfb6933
9 changed files with 133 additions and 126 deletions

View File

@@ -1,29 +1,29 @@
.section data $0x1000 {
.section data 0x1000 {
factorial:
cmplt %r0, $2
cmplt %r0, 2
jnz factorial_one
push %r0
sub %r0, $1
sub %r0, 1
call factorial
pop %r0
mul %status, %r0
jmp factorial_end
factorial_one:
mov %status, $1
mov %status, 1
factorial_end:
ret
main:
mov %r0, $6
mov %r0, 6
call factorial
cmpeq %status, $720
cmpeq %status, 720
jz fail
mov %status, $0
mov %status, 0
jmp end
fail:
mov %status, $1
mov %status, 1
end:
halt