mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-08-21 21:29:08 +00:00
64K FP working again
This commit is contained in:
parent
c0f525b737
commit
e2f1459c92
@ -12,7 +12,7 @@ import cmdsys
|
||||
const MACHID_III = $C0
|
||||
const MACHID_IIC = $88
|
||||
const MACHID_I = $08
|
||||
word MACHID
|
||||
byte MACHID
|
||||
//
|
||||
// System flags: memory allocator screen holes.
|
||||
//
|
||||
|
@ -307,7 +307,7 @@ end
|
||||
//
|
||||
// Machine specific initialization.
|
||||
//
|
||||
when ^MACHID & $C8
|
||||
when MACHID & $C8
|
||||
is $08 // Apple 1
|
||||
conio:keypressed = @a1keypressed
|
||||
conio:home = @a1home
|
||||
|
@ -710,7 +710,7 @@ def loadcode(codefile)
|
||||
//putname(pcode + segname + 8); putc('='); prword(pcode); putln
|
||||
seglen = read(ref, pcode, (pcode + t_diskinfo)=>codeaddr)
|
||||
close(ref)
|
||||
if !fp6502 and ^MACHID & $30 == $30
|
||||
if !fp6502 and (MACHID & $30 == $30)
|
||||
seglen = fixup(AUXADDR, pcode + seglen - 2) - pcode
|
||||
auxmove(AUXADDR, pcode, seglen)
|
||||
pcode = AUXADDR
|
||||
@ -799,7 +799,7 @@ def fpInit()
|
||||
//
|
||||
// Fixup MAIN calls in interface routines
|
||||
//
|
||||
fpzpsave = heapalloc($0033)
|
||||
fpzpsave = heapalloc($0034)
|
||||
(@fixupZPS)=>1 = fpzpsave
|
||||
(@fixupZPR)=>1 = fpzpsave
|
||||
(@fixupFP0)=>1 = fp6502
|
||||
@ -815,7 +815,9 @@ def fpInit()
|
||||
//
|
||||
// Install MAIN HALT handler
|
||||
//
|
||||
zpSave()
|
||||
fpOp1($0005, @fpHalt)
|
||||
zpRestore()
|
||||
fin
|
||||
sane[6] = @elemsLoad1
|
||||
sane[7] = @elemsLoad2
|
||||
@ -826,7 +828,9 @@ def fpInit()
|
||||
//
|
||||
// Reset environment word
|
||||
//
|
||||
sane[9]()
|
||||
sane[3]($0001, $0000)
|
||||
sane[10]()
|
||||
end
|
||||
//
|
||||
// Uninitialized placeholders of API
|
||||
|
@ -70,8 +70,8 @@ byte[t_keypad] = '0', 3, 16, "[0]"
|
||||
word = @zeroKey
|
||||
byte[t_keypad] = '.', 7, 16, "[.]"
|
||||
word = @pointKey
|
||||
byte[t_keypad] = '@', 11, 16, "[@]"
|
||||
word = @opKey
|
||||
byte[t_keypad] = ';', 11, 16, "[;]"
|
||||
word = @chsKey
|
||||
byte[t_keypad] = '+', 15, 16, "[+]"
|
||||
word = @opKey
|
||||
byte[t_keypad] = $0D, 3, 18, "[ENTER]"
|
||||
@ -80,10 +80,10 @@ byte[t_keypad] = '<', 11, 18, "[<]"
|
||||
word = @memKey
|
||||
byte[t_keypad] = '>', 15, 18, "[>]"
|
||||
word = @memKey
|
||||
byte[t_keypad] = 'A', 3, 20, "[(A)BS]"
|
||||
byte[t_keypad] = 'R', 3, 20, "[SQ(R)]"
|
||||
word = @opKey
|
||||
byte[t_keypad] = '^', 11, 20, "[X(^)2]"
|
||||
word = @opKey
|
||||
byte[t_keypad] = 'N', 11, 20, "[(N)EG]"
|
||||
word = @chsKey
|
||||
byte = 0
|
||||
//
|
||||
// Display format state
|
||||
@ -140,7 +140,9 @@ def showMem#0
|
||||
byte strFP[displayWidth+1]
|
||||
|
||||
for m = 0 to 9
|
||||
sane:zpSave()
|
||||
ext2str(@memory[m*t_extended], @strFP, displayWidth - displayFix - 5, displayFix, FPSTR_FIXED)
|
||||
sane:zpRestore()
|
||||
conio:gotoxy(23, 2 + m)
|
||||
repc(displayWidth - strFP - 1, ' ')
|
||||
puts(@strFP)
|
||||
@ -282,11 +284,11 @@ def opKey(pkey)#0
|
||||
is '/'
|
||||
fpu:div()
|
||||
break
|
||||
is '@'
|
||||
fpu:sqrt()
|
||||
is '^'
|
||||
fpu:square()
|
||||
break
|
||||
is 'A'
|
||||
fpu:abs()
|
||||
is 'R'
|
||||
fpu:sqrt()
|
||||
break
|
||||
wend
|
||||
showStack
|
||||
|
@ -3,6 +3,7 @@
|
||||
//
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/sane.plh"
|
||||
|
||||
struc t_decrecord
|
||||
word sgn
|
||||
word exp
|
||||
@ -19,6 +20,14 @@ word iA, iB, iC, zero, fpEnv
|
||||
byte xT[t_extended]
|
||||
byte strNum = "-100.25"
|
||||
byte strA[16]
|
||||
def prbyte(h)#0
|
||||
putc('$')
|
||||
call($FDDA, h, 0, 0, 0)
|
||||
end
|
||||
def prword(h)#0
|
||||
putc('$')
|
||||
call($F941, h >> 8, h, 0, 0)
|
||||
end
|
||||
//
|
||||
// Parse string into decrecord
|
||||
//
|
||||
|
@ -93,7 +93,7 @@ export def main(range)#0
|
||||
puts("10 * 8 = "); puti(a * 8); putln
|
||||
puts("10 / 2 = "); puti(a / 2); putln
|
||||
puts(@hello)
|
||||
when ^MACHID & $C8
|
||||
when MACHID & $C8
|
||||
is $08
|
||||
puts(@a1)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user