mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Save some bytes with inline strings
This commit is contained in:
parent
90643dce45
commit
99402bdf60
@ -93,14 +93,6 @@ word = @argstr, @cmdln
|
||||
word = 0
|
||||
word syslibsym = @exports
|
||||
//
|
||||
// String pool.
|
||||
//
|
||||
byte verstr = "PLASMA "
|
||||
byte freestr = "MEM FREE:$"
|
||||
byte errorstr = "ERR:$"
|
||||
byte okstr = "OK"
|
||||
byte huhstr = "?\n"
|
||||
//
|
||||
// Utility functions
|
||||
//
|
||||
//asm equates included from cmdstub.s
|
||||
@ -750,13 +742,13 @@ def allocheap(size)
|
||||
addr = heap
|
||||
heap = heap + size
|
||||
if systemflags & reshgr1
|
||||
if uword_isle(addr, $4000) and uword_isgt(heap, $2000)
|
||||
if uword_islt(addr, $4000) and uword_isgt(heap, $2000)
|
||||
addr = $4000
|
||||
heap = addr + size
|
||||
fin
|
||||
fin
|
||||
if systemflags & reshgr2
|
||||
if uword_isle(addr, $6000) and uword_isgt(heap, $4000)
|
||||
if uword_islt(addr, $6000) and uword_isgt(heap, $4000)
|
||||
addr = $6000
|
||||
heap = addr + size
|
||||
fin
|
||||
@ -1077,9 +1069,9 @@ def loadmod(mod)
|
||||
else
|
||||
modend = init - defofst + defaddr
|
||||
fin
|
||||
if fixup < 0
|
||||
perr = -fixup
|
||||
fin
|
||||
if fixup < 0
|
||||
perr = -fixup
|
||||
fin
|
||||
else
|
||||
fixup = fixup & ~modinitkeep
|
||||
fin
|
||||
@ -1296,12 +1288,12 @@ else
|
||||
//
|
||||
// Print some startup info.
|
||||
//
|
||||
prstr(@verstr)
|
||||
prstr("PLASMA ")
|
||||
prbyte(version.1)
|
||||
cout('.')
|
||||
prbyte(version.0)
|
||||
crout
|
||||
prstr(@freestr)
|
||||
prstr("MEM FREE:$")
|
||||
prword(availheap)
|
||||
crout
|
||||
fin
|
||||
@ -1328,14 +1320,14 @@ while 1
|
||||
execmod(@cmdln)
|
||||
break
|
||||
otherwise
|
||||
prstr(@huhstr)
|
||||
cout('?')
|
||||
wend
|
||||
if perr
|
||||
prstr(@errorstr)
|
||||
prstr("ERR:$")
|
||||
prbyte(perr)
|
||||
perr = 0
|
||||
else
|
||||
prstr(@okstr)
|
||||
prstr("OK")
|
||||
fin
|
||||
crout()
|
||||
fin
|
||||
|
Loading…
x
Reference in New Issue
Block a user