mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Fix display width calc
This commit is contained in:
parent
f4ce23a3cf
commit
6665199e55
@ -5,7 +5,8 @@ include "inc/cmdsys.plh"
|
|||||||
include "inc/fpstr.plh"
|
include "inc/fpstr.plh"
|
||||||
include "inc/fpu.plh"
|
include "inc/fpu.plh"
|
||||||
include "inc/conio.plh"
|
include "inc/conio.plh"
|
||||||
const displayWidth = 16
|
const displayWidth = 15
|
||||||
|
const displayDefFix = 6
|
||||||
const inputLen = displayWidth+1
|
const inputLen = displayWidth+1
|
||||||
const ZEROSTR = $3001
|
const ZEROSTR = $3001
|
||||||
//
|
//
|
||||||
@ -36,8 +37,8 @@ byte inputStr[32] = ""
|
|||||||
//
|
//
|
||||||
// Display format state
|
// Display format state
|
||||||
//
|
//
|
||||||
byte displayFix = 6
|
byte displayFix = displayDefFix
|
||||||
byte displayInt = displayWidth - 8
|
byte displayInt = displayWidth - displayDefFix - 2
|
||||||
//
|
//
|
||||||
// Store/load memory
|
// Store/load memory
|
||||||
//
|
//
|
||||||
@ -154,7 +155,8 @@ def showStack#0
|
|||||||
for s = 0 to 3
|
for s = 0 to 3
|
||||||
fpu:storStr(@strFP, displayInt, displayFix, FPSTR_FIXED|FPSTR_FLEX, s)
|
fpu:storStr(@strFP, displayInt, displayFix, FPSTR_FIXED|FPSTR_FLEX, s)
|
||||||
conio:gotoxy(4, 5 - s)
|
conio:gotoxy(4, 5 - s)
|
||||||
repc(displayWidth - strFP - 1, ' ')
|
//repc(displayWidth - strFP - 1, ' ')
|
||||||
|
repc(displayWidth - strFP, ' ')
|
||||||
puts(@strFP)
|
puts(@strFP)
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
@ -403,7 +405,7 @@ def cmdKey(pkey)#0
|
|||||||
d = toupper(getc) - '0'
|
d = toupper(getc) - '0'
|
||||||
if d >= 1 and d <= 9
|
if d >= 1 and d <= 9
|
||||||
displayFix = d
|
displayFix = d
|
||||||
displayInt = displayWidth - displayFix - 1
|
displayInt = displayWidth - displayFix - 2
|
||||||
elsif d == 'Q' - '0'
|
elsif d == 'Q' - '0'
|
||||||
quit = TRUE
|
quit = TRUE
|
||||||
fin
|
fin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user