1
0
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:
dschmenk 2015-11-15 13:12:39 -08:00
parent 90643dce45
commit 99402bdf60

View File

@ -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
@ -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