mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
Update version # rto reflect latest fixes
This commit is contained in:
parent
2ae804ea30
commit
4ef760f0e4
BIN
SANDBOX.PO
BIN
SANDBOX.PO
Binary file not shown.
127
src/samplesrc/test.pla
Executable file → Normal file
127
src/samplesrc/test.pla
Executable file → Normal file
@ -1,118 +1,13 @@
|
||||
//
|
||||
// Include all imported modules and their data/functions.
|
||||
//
|
||||
include(cmdsys.plh)
|
||||
include(testlib.plh)
|
||||
//
|
||||
// Structure definition.
|
||||
//
|
||||
struc mystruc
|
||||
byte cmd
|
||||
word param
|
||||
byte[3]
|
||||
word data
|
||||
import cmdsys
|
||||
predef puts
|
||||
end
|
||||
//
|
||||
// Const expression
|
||||
//
|
||||
const constval = 2*(2+3) // a test expression should evaluate to 10
|
||||
//
|
||||
// Declare all global variables for this module.
|
||||
// Note that arrays are declared with prefix []. postfix [], or no [].
|
||||
// Only arrays with predclared sizes need [ and ], such as "int[3] a".
|
||||
//
|
||||
byte[] hello = "Hello, Apple "
|
||||
byte[] a1 = "1"
|
||||
byte[] a2 = "]["
|
||||
byte[] a2p = "][+"
|
||||
byte[] a2e = "//e"
|
||||
byte[] a2c = "//c"
|
||||
byte[] a3 = "///"
|
||||
byte constr = "Constant expression = "
|
||||
byte[] offsets = "Structure offsets:"
|
||||
word array[] = 1, 10, 100, 1000, 10000
|
||||
word ptr
|
||||
byte spaces = " "
|
||||
//
|
||||
// Define functions.
|
||||
//
|
||||
def tens(start)
|
||||
word i
|
||||
i = start
|
||||
repeat
|
||||
print:hex(i)
|
||||
print:str(@spaces)
|
||||
print:dec(i)
|
||||
print:newln()
|
||||
i = i / 10
|
||||
until i == 0
|
||||
|
||||
def header(text)
|
||||
puts("Before\n")
|
||||
puts(text)
|
||||
puts("After\n")
|
||||
end
|
||||
def ascii
|
||||
byte i
|
||||
i = 32
|
||||
while i < 128
|
||||
putc(i)
|
||||
i = i + 1
|
||||
loop
|
||||
end
|
||||
def nums(range)
|
||||
word i
|
||||
for i = range downto -range step range/10
|
||||
puti(i)
|
||||
putln
|
||||
next
|
||||
end
|
||||
export def main(range)
|
||||
nums(*range)
|
||||
tens(*range*10)
|
||||
ascii
|
||||
putln
|
||||
puts(@hello)
|
||||
when MACHID & $C8
|
||||
is $08
|
||||
puts(@a1)
|
||||
break
|
||||
is $00
|
||||
puts(@a2)
|
||||
break
|
||||
is $40
|
||||
puts(@a2p)
|
||||
break
|
||||
is $80
|
||||
puts(@a2e)
|
||||
break
|
||||
is $88
|
||||
puts(@a2c)
|
||||
break
|
||||
is $C0
|
||||
puts(@a3)
|
||||
break
|
||||
otherwise
|
||||
putc('?')
|
||||
wend
|
||||
putln
|
||||
end
|
||||
ptr = @main
|
||||
ptr(@array:6)
|
||||
ptr = @array
|
||||
puti((ptr):6)
|
||||
putln
|
||||
puti(ptr=>6)
|
||||
putln
|
||||
puti((ptr).6)
|
||||
putln
|
||||
puti(ptr->6)
|
||||
putln
|
||||
puts(@offsets)
|
||||
putln
|
||||
puti(cmd)
|
||||
putln
|
||||
puti(param)
|
||||
putln
|
||||
puti(data)
|
||||
putln
|
||||
puti(mystruc)
|
||||
putln
|
||||
puts(@constr); puti(constval); putln
|
||||
puts("Hello from in-line string!\n")
|
||||
done
|
||||
|
||||
header("Hello, world.\n")
|
||||
|
||||
done
|
@ -90,7 +90,7 @@ word = $0450,$04D0,$0550,$05D0,$0650,$06D0,$0750,$07D0
|
||||
// Editor variables
|
||||
//
|
||||
byte nullstr = ""
|
||||
byte version = "PLASMA ][ SANDBOX VERSION 00.90"
|
||||
byte version = "PLASMA ][ SANDBOX VERSION 00.91"
|
||||
byte errorstr = "ERROR: $"
|
||||
byte okstr = "OK"
|
||||
byte outofmem = "OUT OF MEMORY!"
|
||||
|
@ -33,7 +33,7 @@ predef loadmod, execmod, lookupstrmod
|
||||
//
|
||||
// System variable.
|
||||
//
|
||||
word version = $0090 // 00.90
|
||||
word version = $0091 // 00.91
|
||||
word systemflags = 0
|
||||
word heap
|
||||
word xheap = $0800
|
||||
|
Loading…
x
Reference in New Issue
Block a user