From 1af3db75fe49c964d27b5a86e65db9d7b4353ba9 Mon Sep 17 00:00:00 2001 From: Hikaru Ikuta Date: Thu, 6 Jan 2022 17:09:33 +0900 Subject: [PATCH] Use %bp instead of %fs for caching the user input --- sectorlisp.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sectorlisp.S b/sectorlisp.S index 81ffb49..ca06b49 100644 --- a/sectorlisp.S +++ b/sectorlisp.S @@ -54,7 +54,7 @@ begin: mov $0x8000,%sp # uses higher address as stack mov $2,%bx main: mov %sp,%cx call NewLine - mov %dx,%fs # Clear input lookahead cache + mov %dx,%bp # Clear input lookahead cache call Read call Eval xchg %si,%ax @@ -116,7 +116,7 @@ Print: test %si,%si NewLine:mov $'\r',%al jmp PutChar -Read: mov %fs,%dx # Get cached character +Read: mov %bp,%dx # Get cached character call GetToken call GetObject ret @@ -150,7 +150,7 @@ Intern: push %cx # Intern(cx,di): ax GetChar:xor %ax,%ax # GetChar→al:dl int $0x16 # get keystroke - mov %ax,%fs # Used for READ + mov %ax,%bp # Used for READ PutChar:mov $0x0e,%ah # prints CP-437 int $0x10 # vidya service cmp $'\r',%al # don't clobber