From cac1923ebfa74942a5ae0bfe836d73fc408f807e Mon Sep 17 00:00:00 2001 From: Hikaru Ikuta Date: Thu, 6 Jan 2022 13:29:08 +0900 Subject: [PATCH] Shave three more bytes by placing Read inside Apply --- sectorlisp.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sectorlisp.S b/sectorlisp.S index f01f17a..81ffb49 100644 --- a/sectorlisp.S +++ b/sectorlisp.S @@ -116,11 +116,9 @@ Print: test %si,%si NewLine:mov $'\r',%al jmp PutChar -Read: push %dx - mov %fs,%dx # Get cached character +Read: mov %fs,%dx # Get cached character call GetToken call GetObject - pop %dx ret GetObject: # called just after GetToken @@ -232,6 +230,8 @@ Pairlis:test %di,%di # Pairlis(x:di,y:si,a:dx):dx je .ifAtom cmp $kPrint,%al je Print + cmp $kRead,%al + je Read cmp $kCons,%al jae .ifCons .ifCar: cmp $kCar,%al @@ -279,8 +279,6 @@ Eval: test %ax,%ax # Eval(e:ax,a:dx):ax jns Assoc # lookup val if atom xchg %ax,%si # di = e lodsw # ax = Car(e) - cmp $kRead,%ax - je Read cmp $kQuote,%ax # maybe CONS mov (%si),%di # di = Cdr(e) je Car