mirror of
https://github.com/samsonjs/sectorlisp.git
synced 2026-04-27 14:57:41 +00:00
Shave three more bytes using overlaps
This commit is contained in:
parent
c84eed864f
commit
9b0b5e9f20
1 changed files with 4 additions and 6 deletions
10
sectorlisp.S
10
sectorlisp.S
|
|
@ -94,6 +94,10 @@ GetToken: # GetToken():al, dl is g_look
|
||||||
4: mov $')',%al
|
4: mov $')',%al
|
||||||
jmp PutChar
|
jmp PutChar
|
||||||
|
|
||||||
|
Print: test %si,%si
|
||||||
|
jz NewLine
|
||||||
|
xchg %di,%si
|
||||||
|
.byte 0x81 # sub ax, §call Putchar
|
||||||
.PutObject: # .PutObject(c:al,x:si)
|
.PutObject: # .PutObject(c:al,x:si)
|
||||||
.PrintString: # nul-terminated in si
|
.PrintString: # nul-terminated in si
|
||||||
call PutChar # preserves si
|
call PutChar # preserves si
|
||||||
|
|
@ -106,12 +110,6 @@ PrintObject: # PrintObject(x:si)
|
||||||
jnz .PrintString # -> ret
|
jnz .PrintString # -> ret
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Print: test %si,%si
|
|
||||||
jz NewLine
|
|
||||||
xchg %di,%si
|
|
||||||
call PrintObject
|
|
||||||
ret
|
|
||||||
|
|
||||||
NewLine:mov $'\r',%al
|
NewLine:mov $'\r',%al
|
||||||
jmp PutChar
|
jmp PutChar
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue