mirror of
https://github.com/samsonjs/sectorlisp.git
synced 2026-04-27 14:57:41 +00:00
Separate Read and .ifRead
This commit is contained in:
parent
6de7911b7c
commit
e6c6597185
1 changed files with 6 additions and 5 deletions
11
sectorlisp.S
11
sectorlisp.S
|
|
@ -94,7 +94,8 @@ GetToken: # GetToken():al, dl is g_look
|
||||||
4: mov $')',%al
|
4: mov $')',%al
|
||||||
jmp PutChar
|
jmp PutChar
|
||||||
|
|
||||||
Print: xchg %di,%si # Print(x:si)
|
.ifPrint:
|
||||||
|
xchg %di,%si # Print(x:si)
|
||||||
test %di,%di
|
test %di,%di
|
||||||
jnz PrintObject # print newline for empty args
|
jnz PrintObject # print newline for empty args
|
||||||
mov $'\r',%al
|
mov $'\r',%al
|
||||||
|
|
@ -110,8 +111,8 @@ PrintObject: # PrintObject(x:si)
|
||||||
jnz .PrintString # -> ret
|
jnz .PrintString # -> ret
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Read: mov %bp,%dx # get cached character
|
.ifRead:mov %bp,%dx # get cached character
|
||||||
call GetToken
|
Read: call GetToken
|
||||||
# jmp GetObject
|
# jmp GetObject
|
||||||
|
|
||||||
GetObject: # called just after GetToken
|
GetObject: # called just after GetToken
|
||||||
|
|
@ -222,9 +223,9 @@ Pairlis:test %di,%di # Pairlis(x:di,y:si,a:dx):dx
|
||||||
mov (%si),%di # di = Car(x)
|
mov (%si),%di # di = Car(x)
|
||||||
je .ifAtom
|
je .ifAtom
|
||||||
cmp $kPrint,%al
|
cmp $kPrint,%al
|
||||||
je Print
|
je .ifPrint
|
||||||
cmp $kRead,%al
|
cmp $kRead,%al
|
||||||
je Read
|
je .ifRead
|
||||||
cmp $kCons,%al
|
cmp $kCons,%al
|
||||||
jae .ifCons
|
jae .ifCons
|
||||||
.ifCar: cmp $kCar,%al
|
.ifCar: cmp $kCar,%al
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue