mirror of
https://github.com/samsonjs/sectorlisp.git
synced 2026-04-27 14:57:41 +00:00
Shave some bytes (#14) now 443 bytes
This commit is contained in:
parent
bab9ebed18
commit
0637e25bb5
1 changed files with 5 additions and 6 deletions
11
sectorlisp.S
11
sectorlisp.S
|
|
@ -72,11 +72,6 @@ GetToken: # GetToken():al, dl is g_look
|
||||||
xchg %bp,%ax
|
xchg %bp,%ax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.PutObject: # .PutObject(c:al,x:si)
|
|
||||||
call PutChar # preserves si
|
|
||||||
PrintObject: # PrintObject(x:si)
|
|
||||||
test %si,%si # set sf=1 if cons
|
|
||||||
jns .PrintAtom # jump if cons
|
|
||||||
.PrintList:
|
.PrintList:
|
||||||
mov $'(',%al
|
mov $'(',%al
|
||||||
2: push (%bx,%si)
|
2: push (%bx,%si)
|
||||||
|
|
@ -91,8 +86,12 @@ PrintObject: # PrintObject(x:si)
|
||||||
call .PutObject
|
call .PutObject
|
||||||
4: mov $')',%al
|
4: mov $')',%al
|
||||||
jmp PutChar
|
jmp PutChar
|
||||||
|
.PutObject: # .PutObject(c:al,x:si)
|
||||||
.PrintString: # nul-terminated in si
|
.PrintString: # nul-terminated in si
|
||||||
call PutChar
|
call PutChar # preserves si
|
||||||
|
PrintObject: # PrintObject(x:si)
|
||||||
|
test %si,%si # set sf=1 if cons
|
||||||
|
js .PrintList # jump if not cons
|
||||||
.PrintAtom:
|
.PrintAtom:
|
||||||
lodsb
|
lodsb
|
||||||
test %al,%al # test for nul terminator
|
test %al,%al # test for nul terminator
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue