From 0637e25bb5f23c5b3326422eb91a1eaf21387c12 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 23 Nov 2021 19:31:48 -0800 Subject: [PATCH] Shave some bytes (#14) now 443 bytes --- sectorlisp.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sectorlisp.S b/sectorlisp.S index bfbfbef..b3e8c2b 100644 --- a/sectorlisp.S +++ b/sectorlisp.S @@ -72,11 +72,6 @@ GetToken: # GetToken():al, dl is g_look xchg %bp,%ax 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: mov $'(',%al 2: push (%bx,%si) @@ -91,8 +86,12 @@ PrintObject: # PrintObject(x:si) call .PutObject 4: mov $')',%al jmp PutChar +.PutObject: # .PutObject(c:al,x: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: lodsb test %al,%al # test for nul terminator