Skip to content

Commit

Permalink
back to 386+ CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
peterferrie committed Nov 8, 2021
1 parent 74b20f7 commit df9c01c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Binary file modified bin/sectorlisp.bin
Binary file not shown.
7 changes: 4 additions & 3 deletions sectorlisp.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.set boot, 0x7c00

////////////////////////////////////////////////////////////////////////////////
// Currently requires i686+ in real mode
// Currently requires i386+ in real mode
// Can be easily tuned for the IBM PC XT
// Quoth xed -r -isa-set -i sectorlisp.o

Expand Down Expand Up @@ -288,14 +288,13 @@ Apply: test $1,%al # Apply(fn:ax,x:si:a:dx):ax
.ifCar: cmp $ATOM_CAR,%al
je .retA
.ifCdr: cmp $ATOM_CDR,%al
cmove 2(%di),%ax # i686+
je .retD
.ifAtom:cmp $ATOM_ATOM,%al
jne .ifCons
test ONE,%di
jnz .retT
.retF: mov ONE,%ax # ax = NIL
.retD: ret
ret
.dflt1: push %si # save x
push %dx # save a
call Eval
Expand All @@ -304,6 +303,8 @@ Apply: test $1,%al # Apply(fn:ax,x:si:a:dx):ax
jmp Apply

Cadr: mov 2(%di),%di # contents of decrement register
.byte 0x3C # mask next byte
.retD: scasw
.retA: mov (%di),%ax # contents of address register
ret

Expand Down

0 comments on commit df9c01c

Please sign in to comment.