mirror of
https://github.com/samsonjs/sectorlisp.git
synced 2026-04-27 14:57:41 +00:00
Use %bp instead of %fs for caching the user input
This commit is contained in:
parent
cac1923ebf
commit
1af3db75fe
1 changed files with 3 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ begin: mov $0x8000,%sp # uses higher address as stack
|
||||||
mov $2,%bx
|
mov $2,%bx
|
||||||
main: mov %sp,%cx
|
main: mov %sp,%cx
|
||||||
call NewLine
|
call NewLine
|
||||||
mov %dx,%fs # Clear input lookahead cache
|
mov %dx,%bp # Clear input lookahead cache
|
||||||
call Read
|
call Read
|
||||||
call Eval
|
call Eval
|
||||||
xchg %si,%ax
|
xchg %si,%ax
|
||||||
|
|
@ -116,7 +116,7 @@ Print: test %si,%si
|
||||||
NewLine:mov $'\r',%al
|
NewLine:mov $'\r',%al
|
||||||
jmp PutChar
|
jmp PutChar
|
||||||
|
|
||||||
Read: mov %fs,%dx # Get cached character
|
Read: mov %bp,%dx # Get cached character
|
||||||
call GetToken
|
call GetToken
|
||||||
call GetObject
|
call GetObject
|
||||||
ret
|
ret
|
||||||
|
|
@ -150,7 +150,7 @@ Intern: push %cx # Intern(cx,di): ax
|
||||||
|
|
||||||
GetChar:xor %ax,%ax # GetChar→al:dl
|
GetChar:xor %ax,%ax # GetChar→al:dl
|
||||||
int $0x16 # get keystroke
|
int $0x16 # get keystroke
|
||||||
mov %ax,%fs # Used for READ
|
mov %ax,%bp # Used for READ
|
||||||
PutChar:mov $0x0e,%ah # prints CP-437
|
PutChar:mov $0x0e,%ah # prints CP-437
|
||||||
int $0x10 # vidya service
|
int $0x10 # vidya service
|
||||||
cmp $'\r',%al # don't clobber
|
cmp $'\r',%al # don't clobber
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue