From 9b0b5e9f20283a82fbe8ee51be46b00ad99c5d87 Mon Sep 17 00:00:00 2001 From: Hikaru Ikuta Date: Thu, 6 Jan 2022 19:14:31 +0900 Subject: [PATCH] Shave three more bytes using overlaps --- sectorlisp.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sectorlisp.S b/sectorlisp.S index 787d0b9..7103133 100644 --- a/sectorlisp.S +++ b/sectorlisp.S @@ -94,6 +94,10 @@ GetToken: # GetToken():al, dl is g_look 4: mov $')',%al jmp PutChar +Print: test %si,%si + jz NewLine + xchg %di,%si + .byte 0x81 # sub ax, §call Putchar .PutObject: # .PutObject(c:al,x:si) .PrintString: # nul-terminated in si call PutChar # preserves si @@ -106,12 +110,6 @@ PrintObject: # PrintObject(x:si) jnz .PrintString # -> ret ret -Print: test %si,%si - jz NewLine - xchg %di,%si - call PrintObject - ret - NewLine:mov $'\r',%al jmp PutChar