mirror of
https://github.com/samsonjs/sectorlisp.git
synced 2026-04-27 14:57:41 +00:00
Print newline capability
This commit is contained in:
parent
72b037de93
commit
1ff4ea987d
1 changed files with 6 additions and 3 deletions
|
|
@ -53,8 +53,7 @@ begin: mov $0x8000,%sp # uses higher address as stack
|
||||||
pop %ss # errata exists but don't care
|
pop %ss # errata exists but don't care
|
||||||
mov $2,%bx
|
mov $2,%bx
|
||||||
main: mov %sp,%cx
|
main: mov %sp,%cx
|
||||||
mov $'\r',%al
|
call NewLine
|
||||||
call PutChar
|
|
||||||
mov %dx,%fs # Clear input lookahead cache
|
mov %dx,%fs # Clear input lookahead cache
|
||||||
call Read
|
call Read
|
||||||
call EvalPrint
|
call EvalPrint
|
||||||
|
|
@ -106,7 +105,11 @@ PrintObject: # PrintObject(x:si)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Print: mov (%si),%si # si = Cdr(e)
|
Print: mov (%si),%si # si = Cdr(e)
|
||||||
mov (%si),%ax # ax = Car(Cdr(e))
|
test %si,%si
|
||||||
|
jnz 1f
|
||||||
|
NewLine:mov $'\r',%al
|
||||||
|
jmp PutChar
|
||||||
|
1: mov (%si),%ax # ax = Car(Cdr(e))
|
||||||
EvalPrint:
|
EvalPrint:
|
||||||
call Eval
|
call Eval
|
||||||
push %dx
|
push %dx
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue