Browse Source

Unshave four bytes for IBM PC compatibility

Ability to run on original hardware is confirmed.
Justine Tunney 3 năm trước cách đây
mục cha
commit
e90a728894
1 tập tin đã thay đổi với 5 bổ sung9 xóa
  1. 5 9
      sectorlisp.S

+ 5 - 9
sectorlisp.S

@@ -20,6 +20,7 @@
 ╚─────────────────────────────────────────────────────────────────────────────*/
 
 // LISP meta-circular evaluator in a MBR
+// Compatible with the original hardware
 
 .set ATOM_NIL,		(kNil-kSymbols)<<1|1
 .set ATOM_QUOTE,	(kQuote-kSymbols)<<1|1
@@ -38,11 +39,6 @@
 .set ONE,		%cx
 .set TWO,		%bx
 
-////////////////////////////////////////////////////////////////////////////////
-// Currently requires i386+ in real mode
-// Can be easily tuned for the IBM PC XT
-// Quoth xed -r -isa-set -i sectorlisp.o
-
 .section .text,"ax",@progbits
 .type	kSymbols,@object
 .type	_begin,@function
@@ -73,10 +69,10 @@ _begin:	push	%cs				# memory model ds=es=ss=cs
 	cld					# clear direction flag
 	rep stosb				# memset(0x8000,0,0x8000)
 	push	%ds				# cx is now zero
-#	cli					# disable interrupts
+	cli					# disable interrupts
 	pop	%ss				# disable nonmaskable interrupts
 	mov	%ax,%sp				# use null pointer as our stack
-#	sti					# enable interrupts
+	sti					# enable interrupts
 	inc	ONE				# ++cx
 	mov	ONE,TWO
 	inc	TWO
@@ -181,10 +177,10 @@ GetChar:
 						# ah is bios scancode
 						# al is ascii character
 PutChar:
-#	push	%bp				# original ibm pc scroll up bug
+	push	%bp				# original ibm pc scroll up bug
 	mov	$0x0e,%ah			# teletype output al cp437
 	int	$0x10				# vidya service
-#	pop	%bp				# preserves al
+	pop	%bp				# preserves al
 	cmp	$'\r',%al			# don't clobber stuff
 	jne	.ret
 	mov	$'\n',%al