mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-10-18 07:24:16 +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 = 0
|
||||||
word syslibsym = @exports
|
word syslibsym = @exports
|
||||||
//
|
//
|
||||||
// String pool.
|
|
||||||
//
|
|
||||||
byte verstr = "PLASMA "
|
|
||||||
byte freestr = "MEM FREE:$"
|
|
||||||
byte errorstr = "ERR:$"
|
|
||||||
byte okstr = "OK"
|
|
||||||
byte huhstr = "?\n"
|
|
||||||
//
|
|
||||||
// Utility functions
|
// Utility functions
|
||||||
//
|
//
|
||||||
//asm equates included from cmdstub.s
|
//asm equates included from cmdstub.s
|
||||||
@ -750,13 +742,13 @@ def allocheap(size)
|
|||||||
addr = heap
|
addr = heap
|
||||||
heap = heap + size
|
heap = heap + size
|
||||||
if systemflags & reshgr1
|
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
|
addr = $4000
|
||||||
heap = addr + size
|
heap = addr + size
|
||||||
fin
|
fin
|
||||||
fin
|
fin
|
||||||
if systemflags & reshgr2
|
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
|
addr = $6000
|
||||||
heap = addr + size
|
heap = addr + size
|
||||||
fin
|
fin
|
||||||
@ -1077,9 +1069,9 @@ def loadmod(mod)
|
|||||||
else
|
else
|
||||||
modend = init - defofst + defaddr
|
modend = init - defofst + defaddr
|
||||||
fin
|
fin
|
||||||
if fixup < 0
|
if fixup < 0
|
||||||
perr = -fixup
|
perr = -fixup
|
||||||
fin
|
fin
|
||||||
else
|
else
|
||||||
fixup = fixup & ~modinitkeep
|
fixup = fixup & ~modinitkeep
|
||||||
fin
|
fin
|
||||||
@ -1296,12 +1288,12 @@ else
|
|||||||
//
|
//
|
||||||
// Print some startup info.
|
// Print some startup info.
|
||||||
//
|
//
|
||||||
prstr(@verstr)
|
prstr("PLASMA ")
|
||||||
prbyte(version.1)
|
prbyte(version.1)
|
||||||
cout('.')
|
cout('.')
|
||||||
prbyte(version.0)
|
prbyte(version.0)
|
||||||
crout
|
crout
|
||||||
prstr(@freestr)
|
prstr("MEM FREE:$")
|
||||||
prword(availheap)
|
prword(availheap)
|
||||||
crout
|
crout
|
||||||
fin
|
fin
|
||||||
@ -1328,14 +1320,14 @@ while 1
|
|||||||
execmod(@cmdln)
|
execmod(@cmdln)
|
||||||
break
|
break
|
||||||
otherwise
|
otherwise
|
||||||
prstr(@huhstr)
|
cout('?')
|
||||||
wend
|
wend
|
||||||
if perr
|
if perr
|
||||||
prstr(@errorstr)
|
prstr("ERR:$")
|
||||||
prbyte(perr)
|
prbyte(perr)
|
||||||
perr = 0
|
perr = 0
|
||||||
else
|
else
|
||||||
prstr(@okstr)
|
prstr("OK")
|
||||||
fin
|
fin
|
||||||
crout()
|
crout()
|
||||||
fin
|
fin
|
||||||
|
Loading…
Reference in New Issue
Block a user