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