introduced txt.nl()

This commit is contained in:
Irmen de Jong 2021-01-08 16:56:17 +01:00
parent f61682cdc7
commit b4d1d545a8
26 changed files with 441 additions and 460 deletions

View File

@ -16,7 +16,7 @@ cx16logo {
uword strptr uword strptr
for strptr in logo_lines for strptr in logo_lines
txt.print(strptr) txt.print(strptr)
txt.chrout('\n') txt.nl()
} }
str[] logo_lines = [ str[] logo_lines = [

View File

@ -38,7 +38,7 @@ diskio {
break break
txt.chrout(char) txt.chrout(char)
} }
txt.chrout('\n') txt.nl()
void c64.CHRIN() ; skip 2 bytes void c64.CHRIN() ; skip 2 bytes
void c64.CHRIN() void c64.CHRIN()
status = c64.READST() status = c64.READST()
@ -54,7 +54,7 @@ io_error:
if status and status != 64 { ; 64=end of file if status and status != 64 { ; 64=end of file
txt.print("\ni/o error, status: ") txt.print("\ni/o error, status: ")
txt.print_ub(status) txt.print_ub(status)
txt.chrout('\n') txt.nl()
return false return false
} }

View File

@ -86,10 +86,10 @@ This code calculates prime numbers using the Sieve of Eratosthenes algorithm::
txt.print(", ") txt.print(", ")
amount++ amount++
} }
txt.chrout('\n') txt.nl()
txt.print("number of primes (expected 54): ") txt.print("number of primes (expected 54): ")
txt.print_ub(amount) txt.print_ub(amount)
txt.chrout('\n') txt.nl()
} }
sub find_next_prime() -> ubyte { sub find_next_prime() -> ubyte {

View File

@ -20,237 +20,237 @@ main {
uword[] uwarr = [%1100111110101010] uword[] uwarr = [%1100111110101010]
repeat(10) { repeat(10) {
txt.chrout('\n') txt.nl()
} }
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(uwarr[0]) rol(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(uwarr[0]) rol(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(uwarr[0]) rol(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(uwarr[0]) rol(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
uwarr[0] = %1100111110101010 uwarr[0] = %1100111110101010
ror(uwarr[0]) ror(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(uwarr[0]) ror(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(uwarr[0]) ror(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(uwarr[0]) ror(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(uwarr[0]) ror(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
sys.clear_carry() sys.clear_carry()
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
rol2(uwarr[0]) rol2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
rol2(uwarr[0]) rol2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
rol2(uwarr[0]) rol2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
rol2(uwarr[0]) rol2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
ror2(uwarr[0]) ror2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
ror2(uwarr[0]) ror2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
ror2(uwarr[0]) ror2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
ror2(uwarr[0]) ror2(uwarr[0])
txt.print_uwbin(uwarr[0], true) txt.print_uwbin(uwarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(ubarr[0]) rol(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(ubarr[0]) rol(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(ubarr[0]) rol(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(ubarr[0]) rol(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(ubarr[0]) ror(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(ubarr[0]) ror(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(ubarr[0]) ror(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(ubarr[0]) ror(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(ubarr[0]) ror(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
rol2(ubarr[0]) rol2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
rol2(ubarr[0]) rol2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
rol2(ubarr[0]) rol2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
rol2(ubarr[0]) rol2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
ror2(ubarr[0]) ror2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
ror2(ubarr[0]) ror2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
ror2(ubarr[0]) ror2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
ror2(ubarr[0]) ror2(ubarr[0])
txt.print_ubbin(ubarr[0], true) txt.print_ubbin(ubarr[0], true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
&ubyte membyte = $c000 &ubyte membyte = $c000
uword addr = $c000 uword addr = $c000
@(addr) = %10110101 @(addr) = %10110101
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(@(addr)) rol(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(@(addr)) rol(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(@(addr)) rol(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
rol(@(addr)) rol(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
@(addr) = %10110101 @(addr) = %10110101
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(@(addr)) ror(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(@(addr)) ror(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(@(addr)) ror(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
sys.set_carry() sys.set_carry()
ror(@(addr)) ror(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
@(addr) = %10110101 @(addr) = %10110101
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
rol2(@(addr)) rol2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
rol2(@(addr)) rol2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
rol2(@(addr)) rol2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
rol2(@(addr)) rol2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
@(addr) = %10110101 @(addr) = %10110101
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
ror2(@(addr)) ror2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
ror2(@(addr)) ror2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
ror2(@(addr)) ror2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
ror2(@(addr)) ror2(@(addr))
txt.print_ubbin(@(addr), true) txt.print_ubbin(@(addr), true)
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
test_stack.test() test_stack.test()
@ -270,297 +270,297 @@ main {
word ww word ww
repeat(20) { repeat(20) {
txt.chrout('\n') txt.nl()
} }
ub = sys.read_flags() ub = sys.read_flags()
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+sys.read_flags()*1+zero ub = zero+sys.read_flags()*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = rnd() ub = rnd()
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+rnd()*1+zero ub = zero+rnd()*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
uw = rndw() uw = rndw()
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+rndw()*1+zero uw = zero+rndw()*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = 50000 uw = 50000
ub = sqrt16(uw) ub = sqrt16(uw)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+sqrt16(uw)*1+zero ub = zero+sqrt16(uw)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
bb = -100 bb = -100
bb = sgn(bb) bb = sgn(bb)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = -100 bb = -100
bb = zero+sgn(bb)*1+zero bb = zero+sgn(bb)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ub = 100 ub = 100
bb = sgn(ub) bb = sgn(ub)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ub = 100 ub = 100
bb = zero+sgn(ub)*1+zero bb = zero+sgn(ub)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ww = -1000 ww = -1000
bb = sgn(ww) bb = sgn(ww)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+sgn(ww)*1+zero bb = zero+sgn(ww)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
uw = 1000 uw = 1000
bb = sgn(uw) bb = sgn(uw)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+sgn(uw)*1+zero bb = zero+sgn(uw)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ub = 0 ub = 0
uw = sin16u(ub) uw = sin16u(ub)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+sin16u(ub)*1+zero uw = zero+sin16u(ub)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ub = 0 ub = 0
uw = cos16u(ub) uw = cos16u(ub)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+cos16u(ub)*1+zero uw = zero+cos16u(ub)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ub = 0 ub = 0
ww = sin16(ub) ww = sin16(ub)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = zero+sin16(ub)*1+zero ww = zero+sin16(ub)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ub = 0 ub = 0
ww = cos16(ub) ww = cos16(ub)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
uw = 0 uw = 0
ww = zero+cos16(ub)*1+zero ww = zero+cos16(ub)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ub2 = 0 ub2 = 0
ub = sin8u(ub2) ub = sin8u(ub2)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+sin8u(ub2)*1+zero ub = zero+sin8u(ub2)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub2 = 0 ub2 = 0
ub = cos8u(ub2) ub = cos8u(ub2)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+cos8u(ub2)*1+zero ub = zero+cos8u(ub2)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub2 = 0 ub2 = 0
bb = sin8(ub2) bb = sin8(ub2)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+sin8(ub2)*1+zero bb = zero+sin8(ub2)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ub2 = 0 ub2 = 0
bb = cos8(ub2) bb = cos8(ub2)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+cos8(ub2)*1+zero bb = zero+cos8(ub2)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = -100 bb = -100
bb = abs(bb) bb = abs(bb)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = -100 bb = -100
bb = zero+abs(bb)*1+zero bb = zero+abs(bb)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
ww = -1000 ww = -1000
ww = abs(ww) ww = abs(ww)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = -1000 ww = -1000
ww = zero+abs(ww)*1+zero ww = zero+abs(ww)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ub = min(ubarr) ub = min(ubarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+min(ubarr)*1+zero ub = zero+min(ubarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
bb = min(barr) bb = min(barr)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+min(barr)*1+zero bb = zero+min(barr)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
uw = min(uwarr) uw = min(uwarr)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+min(uwarr)*1+zero uw = zero+min(uwarr)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ww = min(warr) ww = min(warr)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = zero+min(warr)*1+zero ww = zero+min(warr)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ub = max(ubarr) ub = max(ubarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+max(ubarr)*1+zero ub = zero+max(ubarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
bb = max(barr) bb = max(barr)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
bb = zero+max(barr)*1+zero bb = zero+max(barr)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
uw = max(uwarr) uw = max(uwarr)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+max(uwarr)*1+zero uw = zero+max(uwarr)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ww = max(warr) ww = max(warr)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = zero+max(warr)*1+zero ww = zero+max(warr)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ub = any(ubarr) ub = any(ubarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+any(ubarr)*1+zero ub = zero+any(ubarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = any(barr) ub = any(barr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+any(barr)*1+zero ub = zero+any(barr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = any(uwarr) ub = any(uwarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+any(uwarr)*1+zero ub = zero+any(uwarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = any(warr) ub = any(warr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+any(warr)*1+zero ub = zero+any(warr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = all(ubarr) ub = all(ubarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+all(ubarr)*1+zero ub = zero+all(ubarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = all(barr) ub = all(barr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+all(barr)*1+zero ub = zero+all(barr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = all(uwarr) ub = all(uwarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+all(uwarr)*1+zero ub = zero+all(uwarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = all(warr) ub = all(warr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+all(warr)*1+zero ub = zero+all(warr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
uw = sum(ubarr) uw = sum(ubarr)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+sum(ubarr)*1+zero uw = zero+sum(ubarr)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ww = sum(barr) ww = sum(barr)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = zero+sum(barr)*1+zero ww = zero+sum(barr)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
uw = sum(uwarr) uw = sum(uwarr)
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
uw = zero+sum(uwarr)*1+zero uw = zero+sum(uwarr)*1+zero
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout('\n') txt.nl()
ww = sum(warr) ww = sum(warr)
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
ww = zero+sum(warr)*1+zero ww = zero+sum(warr)*1+zero
txt.print_w(ww) txt.print_w(ww)
txt.chrout('\n') txt.nl()
sort(ubarr) sort(ubarr)
sort(barr) sort(barr)
@ -588,176 +588,176 @@ main {
fl = -9.9 fl = -9.9
fl = abs(fl) fl = abs(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+abs(fl)*1.0+fzero fl = fzero+abs(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 9.9 fl = 9.9
fl = atan(fl) fl = atan(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 9.9 fl = 9.9
fl = fzero+atan(fl)*1.0+fzero fl = fzero+atan(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = ceil(fl) fl = ceil(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+ceil(fl)*1.0+fzero fl = fzero+ceil(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = cos(fl) fl = cos(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+cos(fl)*1.0+fzero fl = fzero+cos(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = sin(fl) fl = sin(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+sin(fl)*1.0+fzero fl = fzero+sin(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 9.9 fl = 9.9
fl = tan(fl) fl = tan(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 9.9 fl = 9.9
fl = fzero+tan(fl)*1.0+fzero fl = fzero+tan(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = deg(fl) fl = deg(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = fzero+deg(fl)*1.0+fzero fl = fzero+deg(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 90 fl = 90
fl = rad(fl) fl = rad(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 90 fl = 90
fl = fzero+rad(fl)*1.0+fzero fl = fzero+rad(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = floor(fl) fl = floor(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+floor(fl)*1.0+fzero fl = fzero+floor(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = ln(fl) fl = ln(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = fzero+ln(fl)*1.0+fzero fl = fzero+ln(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = log2(fl) fl = log2(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = fzero+log2(fl)*1.0+fzero fl = fzero+log2(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = round(fl) fl = round(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
fl = fzero+round(fl)*1.0+fzero fl = fzero+round(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
bb = sgn(fl) bb = sgn(fl)
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
fl = -9.9 fl = -9.9
bb = zero+sgn(fl)*1+zero bb = zero+sgn(fl)*1+zero
txt.print_b(bb) txt.print_b(bb)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = sqrt(fl) fl = sqrt(fl)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = 3.1415927 fl = 3.1415927
fl = fzero+sqrt(fl)*1.0+fzero fl = fzero+sqrt(fl)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = rndf() fl = rndf()
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = fzero+rndf()*1.0+fzero fl = fzero+rndf()*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
swap(fl, fzero) swap(fl, fzero)
swap(fzero, fl) swap(fzero, fl)
ub = any(flarr) ub = any(flarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+any(flarr)*1+zero ub = zero+any(flarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = all(flarr) ub = all(flarr)
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
ub = zero+all(flarr)*1+zero ub = zero+all(flarr)*1+zero
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout('\n') txt.nl()
reverse(flarr) reverse(flarr)
for ub in 0 to len(flarr)-1 { for ub in 0 to len(flarr)-1 {
floats.print_f(flarr[ub]) floats.print_f(flarr[ub])
txt.chrout(',') txt.chrout(',')
} }
txt.chrout('\n') txt.nl()
fl = max(flarr) fl = max(flarr)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = fzero+max(flarr)*1.0+fzero fl = fzero+max(flarr)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = min(flarr) fl = min(flarr)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = fzero+min(flarr)*1.0+fzero fl = fzero+min(flarr)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = sum(flarr) fl = sum(flarr)
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
fl = fzero+sum(flarr)*1.0+fzero fl = fzero+sum(flarr)*1.0+fzero
floats.print_f(fl) floats.print_f(fl)
txt.chrout('\n') txt.nl()
test_stack.test() test_stack.test()
} }

View File

@ -6,7 +6,7 @@
main { main {
sub start() { sub start() {
repeat 25 { repeat 25 {
txt.chrout('\n') txt.nl()
} }
ubyte ub ubyte ub
@ -25,7 +25,7 @@ main {
else { else {
txt.print("1 fail:") txt.print("1 fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -39,7 +39,7 @@ main {
else { else {
txt.print("2 fail:") txt.print("2 fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
uwsum = 50000 uwsum = 50000
@ -53,7 +53,7 @@ main {
else { else {
txt.print("3 fail:") txt.print("3 fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
bb = 100 bb = 100
@ -90,7 +90,7 @@ main {
else { else {
txt.print("6 fail:") txt.print("6 fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -104,7 +104,7 @@ main {
else { else {
txt.print("7 fail:") txt.print("7 fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -118,10 +118,10 @@ main {
else { else {
txt.print("8 fail:") txt.print("8 fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
txt.chrout('\n') txt.nl()
@ -135,7 +135,7 @@ main {
else { else {
txt.print("1b fail:") txt.print("1b fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
bb = 0 bb = 0
@ -148,7 +148,7 @@ main {
else { else {
txt.print("2b fail:") txt.print("2b fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
uwsum = 50000 uwsum = 50000
@ -160,7 +160,7 @@ main {
else { else {
txt.print("3b fail:") txt.print("3b fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
wsum -= (100+bb) wsum -= (100+bb)
@ -190,7 +190,7 @@ main {
else { else {
txt.print("6b fail:") txt.print("6b fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -202,7 +202,7 @@ main {
else { else {
txt.print("7b fail:") txt.print("7b fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -214,10 +214,10 @@ main {
else { else {
txt.print("8b fail:") txt.print("8b fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
txt.chrout('\n') txt.nl()
@ -230,7 +230,7 @@ main {
else { else {
txt.print("1c fail:") txt.print("1c fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -242,7 +242,7 @@ main {
else { else {
txt.print("2c fail:") txt.print("2c fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
uwsum = 50000 uwsum = 50000
@ -254,7 +254,7 @@ main {
else { else {
txt.print("3c fail:") txt.print("3c fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
wsum -= 100 wsum -= 100
@ -284,7 +284,7 @@ main {
else { else {
txt.print("6c fail:") txt.print("6c fail:")
txt.print_uw(uwsum) txt.print_uw(uwsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -296,7 +296,7 @@ main {
else { else {
txt.print("7c fail:") txt.print("7c fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
wsum = -30000 wsum = -30000
@ -308,7 +308,7 @@ main {
else { else {
txt.print("8c fail:") txt.print("8c fail:")
txt.print_w(wsum) txt.print_w(wsum)
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -13,20 +13,20 @@ main {
sub start() { sub start() {
repeat(25) repeat(25)
txt.chrout('\n') txt.nl()
equal() equal()
txt.chrout('\n') txt.nl()
notequal() notequal()
txt.chrout('\n') txt.nl()
less() less()
txt.chrout('\n') txt.nl()
greater() greater()
txt.chrout('\n') txt.nl()
lessequal() lessequal()
txt.chrout('\n') txt.nl()
greaterequal() greaterequal()
txt.chrout('\n') txt.nl()
} }
sub equal() { sub equal() {

View File

@ -20,57 +20,57 @@ main {
txt.print("uword <=\n") txt.print("uword <=\n")
txt.print_uw(65535) txt.print_uw(65535)
txt.chrout('\n') txt.nl()
check_lesseq_uw(0, 65535) check_lesseq_uw(0, 65535)
txt.print_uw(0) txt.print_uw(0)
txt.chrout('\n') txt.nl()
check_not_lesseq_uw(65535, 0) check_not_lesseq_uw(65535, 0)
comparevar = 65535 comparevar = 65535
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 65535-2 comparevar = 65535-2
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 65535-254 comparevar = 65535-254
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 65535-255 comparevar = 65535-255
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 65535-256 comparevar = 65535-256
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 65535-5000 comparevar = 65535-5000
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
comparevar = 32769 comparevar = 32769
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto 0 { for lessvar in comparevar downto 0 {
check_lesseq_uw(lessvar, comparevar) check_lesseq_uw(lessvar, comparevar)
} }
@ -78,42 +78,42 @@ main {
comparevar = 32768 comparevar = 32768
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
comparevar = 1 comparevar = 1
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
comparevar = 11111 comparevar = 11111
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
comparevar = 255 comparevar = 255
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
comparevar = 256 comparevar = 256
txt.print_uw(comparevar) txt.print_uw(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 65535 downto comparevar+1 { for lessvar in 65535 downto comparevar+1 {
check_not_lesseq_uw(lessvar, comparevar) check_not_lesseq_uw(lessvar, comparevar)
} }
@ -144,7 +144,7 @@ main {
txt.print_uw(w1) txt.print_uw(w1)
txt.print(" <= ") txt.print(" <= ")
txt.print_uw(w2) txt.print_uw(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -171,7 +171,7 @@ main {
txt.print_uw(w1) txt.print_uw(w1)
txt.print(" not <= ") txt.print(" not <= ")
txt.print_uw(w2) txt.print_uw(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -184,113 +184,113 @@ main {
txt.print("word >\n") txt.print("word >\n")
txt.print_w(-32767) txt.print_w(-32767)
txt.chrout('\n') txt.nl()
check_greater_w(32767, -32767) check_greater_w(32767, -32767)
txt.print_w(32766) txt.print_w(32766)
txt.chrout('\n') txt.nl()
check_not_greater_w(-32766, 32766) check_not_greater_w(-32766, 32766)
comparevar = 32765 comparevar = 32765
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar downto -32768 { for biggervar in comparevar downto -32768 {
check_not_greater_w(biggervar, comparevar) check_not_greater_w(biggervar, comparevar)
} }
comparevar = -1 comparevar = -1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar downto -32768 { for biggervar in comparevar downto -32768 {
check_not_greater_w(biggervar, comparevar) check_not_greater_w(biggervar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar downto -32768 { for biggervar in comparevar downto -32768 {
check_not_greater_w(biggervar, comparevar) check_not_greater_w(biggervar, comparevar)
} }
comparevar = 11111 comparevar = 11111
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar downto -32768 { for biggervar in comparevar downto -32768 {
check_not_greater_w(biggervar, comparevar) check_not_greater_w(biggervar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = -2 comparevar = -2
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = -254 comparevar = -254
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = -255 comparevar = -255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = -256 comparevar = -256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = -5000 comparevar = -5000
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = 1 comparevar = 1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = 255 comparevar = 255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = 256 comparevar = 256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = 257 comparevar = 257
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
comparevar = 32760 comparevar = 32760
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar+1 { for biggervar in 32767 downto comparevar+1 {
check_greater_w(biggervar, comparevar) check_greater_w(biggervar, comparevar)
} }
@ -327,7 +327,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" > ") txt.print(" > ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -361,7 +361,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" not > ") txt.print(" not > ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -374,113 +374,113 @@ main {
txt.print("word >=\n") txt.print("word >=\n")
txt.print_w(-32767) txt.print_w(-32767)
txt.chrout('\n') txt.nl()
check_greatereq_w(32767, -32767) check_greatereq_w(32767, -32767)
txt.print_w(32766) txt.print_w(32766)
txt.chrout('\n') txt.nl()
check_not_greatereq_w(-32766, 32766) check_not_greatereq_w(-32766, 32766)
comparevar = 32765 comparevar = 32765
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar-1 downto -32768 { for biggervar in comparevar-1 downto -32768 {
check_not_greatereq_w(biggervar, comparevar) check_not_greatereq_w(biggervar, comparevar)
} }
comparevar = -1 comparevar = -1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar-1 downto -32768 { for biggervar in comparevar-1 downto -32768 {
check_not_greatereq_w(biggervar, comparevar) check_not_greatereq_w(biggervar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar-1 downto -32768 { for biggervar in comparevar-1 downto -32768 {
check_not_greatereq_w(biggervar, comparevar) check_not_greatereq_w(biggervar, comparevar)
} }
comparevar = 11111 comparevar = 11111
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in comparevar-1 downto -32768 { for biggervar in comparevar-1 downto -32768 {
check_not_greatereq_w(biggervar, comparevar) check_not_greatereq_w(biggervar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = -2 comparevar = -2
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = -254 comparevar = -254
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = -255 comparevar = -255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = -256 comparevar = -256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = -5000 comparevar = -5000
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = 1 comparevar = 1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = 255 comparevar = 255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = 256 comparevar = 256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = 257 comparevar = 257
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
comparevar = 32767 comparevar = 32767
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for biggervar in 32767 downto comparevar { for biggervar in 32767 downto comparevar {
check_greatereq_w(biggervar, comparevar) check_greatereq_w(biggervar, comparevar)
} }
@ -517,7 +517,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" >= ") txt.print(" >= ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -551,7 +551,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" not >= ") txt.print(" not >= ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -564,85 +564,85 @@ main {
txt.print("word <=\n") txt.print("word <=\n")
txt.print_w(32767) txt.print_w(32767)
txt.chrout('\n') txt.nl()
check_lesseq_w(-32767, 32767) check_lesseq_w(-32767, 32767)
txt.print_w(-32767) txt.print_w(-32767)
txt.chrout('\n') txt.nl()
check_not_lesseq_w(32767, -32767) check_not_lesseq_w(32767, -32767)
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = -2 comparevar = -2
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = -254 comparevar = -254
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = -255 comparevar = -255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = -256 comparevar = -256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = -5000 comparevar = -5000
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = 1 comparevar = 1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = 255 comparevar = 255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = 256 comparevar = 256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = 257 comparevar = 257
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
comparevar = 32767 comparevar = 32767
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in comparevar downto -32768 { for lessvar in comparevar downto -32768 {
check_lesseq_w(lessvar, comparevar) check_lesseq_w(lessvar, comparevar)
} }
@ -650,28 +650,28 @@ main {
comparevar = -32768 comparevar = -32768
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto comparevar+1 { for lessvar in 32766 downto comparevar+1 {
check_not_lesseq_w(lessvar, comparevar) check_not_lesseq_w(lessvar, comparevar)
} }
comparevar = -1 comparevar = -1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto comparevar+1 { for lessvar in 32766 downto comparevar+1 {
check_not_lesseq_w(lessvar, comparevar) check_not_lesseq_w(lessvar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto comparevar+1 { for lessvar in 32766 downto comparevar+1 {
check_not_lesseq_w(lessvar, comparevar) check_not_lesseq_w(lessvar, comparevar)
} }
comparevar = 11111 comparevar = 11111
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto comparevar+1 { for lessvar in 32766 downto comparevar+1 {
check_not_lesseq_w(lessvar, comparevar) check_not_lesseq_w(lessvar, comparevar)
} }
@ -701,7 +701,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" <= ") txt.print(" <= ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -728,7 +728,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" not <= ") txt.print(" not <= ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -741,113 +741,113 @@ main {
txt.print("word <\n") txt.print("word <\n")
txt.print_w(32767) txt.print_w(32767)
txt.chrout('\n') txt.nl()
check_less_w(-32767, 32767) check_less_w(-32767, 32767)
txt.print_w(-32767) txt.print_w(-32767)
txt.chrout('\n') txt.nl()
check_not_less_w(32767, -32767) check_not_less_w(32767, -32767)
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -1 downto -32768 { for lessvar in -1 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -2 comparevar = -2
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -3 downto -32768 { for lessvar in -3 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -254 comparevar = -254
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -255 downto -32768 { for lessvar in -255 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -255 comparevar = -255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -256 downto -32768 { for lessvar in -256 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -256 comparevar = -256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -257 downto -32768 { for lessvar in -257 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -5000 comparevar = -5000
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in -5001 downto -32768 { for lessvar in -5001 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = 1 comparevar = 1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 0 downto -32768 { for lessvar in 0 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = 255 comparevar = 255
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 254 downto -32768 { for lessvar in 254 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = 256 comparevar = 256
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 255 downto -32768 { for lessvar in 255 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = 257 comparevar = 257
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 256 downto -32768 { for lessvar in 256 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = 32767 comparevar = 32767
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto -32768 { for lessvar in 32766 downto -32768 {
check_less_w(lessvar, comparevar) check_less_w(lessvar, comparevar)
} }
comparevar = -32768 comparevar = -32768
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto -32768 { for lessvar in 32766 downto -32768 {
check_not_less_w(lessvar, comparevar) check_not_less_w(lessvar, comparevar)
} }
comparevar = -1 comparevar = -1
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto -1 { for lessvar in 32766 downto -1 {
check_not_less_w(lessvar, comparevar) check_not_less_w(lessvar, comparevar)
} }
comparevar = 0 comparevar = 0
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto 0 { for lessvar in 32766 downto 0 {
check_not_less_w(lessvar, comparevar) check_not_less_w(lessvar, comparevar)
} }
comparevar = 11111 comparevar = 11111
txt.print_w(comparevar) txt.print_w(comparevar)
txt.chrout('\n') txt.nl()
for lessvar in 32766 downto 11111 { for lessvar in 32766 downto 11111 {
check_not_less_w(lessvar, comparevar) check_not_less_w(lessvar, comparevar)
} }
@ -877,7 +877,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" < ") txt.print(" < ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }
@ -904,7 +904,7 @@ main {
txt.print_w(w1) txt.print_w(w1)
txt.print(" not < ") txt.print(" not < ")
txt.print_w(w2) txt.print_w(w2)
txt.chrout('\n') txt.nl()
sys.exit(1) sys.exit(1)
} }
} }

View File

@ -45,7 +45,7 @@ main {
util.print_10s(ship.cash) util.print_10s(ship.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -112,7 +112,7 @@ trader {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -140,7 +140,7 @@ trader {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -361,7 +361,7 @@ market {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet.print_name_uppercase() planet.print_name_uppercase()
txt.print(" trade market:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -377,7 +377,7 @@ market {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship.cargohold[ci]) txt.print_ub(ship.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -614,7 +614,7 @@ galaxy {
txt.print_uwhex(galaxy.seed[1], true) txt.print_uwhex(galaxy.seed[1], true)
txt.print("\ngalaxy seed2=") txt.print("\ngalaxy seed2=")
txt.print_uwhex(galaxy.seed[2], true) txt.print_uwhex(galaxy.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -899,9 +899,9 @@ planet {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf10 {
util10.print_10s(ship10.cash) util10.print_10s(ship10.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader10 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader10 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market10 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet10.print_name_uppercase() planet10.print_name_uppercase()
txt.print(" trade market10:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market10:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market10 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship10.cargohold[ci]) txt.print_ub(ship10.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy10 {
txt.print_uwhex(galaxy10.seed[1], true) txt.print_uwhex(galaxy10.seed[1], true)
txt.print("\ngalaxy10 seed2=") txt.print("\ngalaxy10 seed2=")
txt.print_uwhex(galaxy10.seed[2], true) txt.print_uwhex(galaxy10.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet10 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf2 {
util2.print_10s(ship2.cash) util2.print_10s(ship2.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader2 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader2 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market2 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet2.print_name_uppercase() planet2.print_name_uppercase()
txt.print(" trade market2:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market2:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market2 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship2.cargohold[ci]) txt.print_ub(ship2.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy2 {
txt.print_uwhex(galaxy2.seed[1], true) txt.print_uwhex(galaxy2.seed[1], true)
txt.print("\ngalaxy2 seed2=") txt.print("\ngalaxy2 seed2=")
txt.print_uwhex(galaxy2.seed[2], true) txt.print_uwhex(galaxy2.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet2 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf3 {
util3.print_10s(ship3.cash) util3.print_10s(ship3.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader3 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader3 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market3 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet3.print_name_uppercase() planet3.print_name_uppercase()
txt.print(" trade market3:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market3:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market3 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship3.cargohold[ci]) txt.print_ub(ship3.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy3 {
txt.print_uwhex(galaxy3.seed[1], true) txt.print_uwhex(galaxy3.seed[1], true)
txt.print("\ngalaxy3 seed2=") txt.print("\ngalaxy3 seed2=")
txt.print_uwhex(galaxy3.seed[2], true) txt.print_uwhex(galaxy3.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet3 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf4 {
util4.print_10s(ship4.cash) util4.print_10s(ship4.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader4 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader4 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market4 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet4.print_name_uppercase() planet4.print_name_uppercase()
txt.print(" trade market4:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market4:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market4 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship4.cargohold[ci]) txt.print_ub(ship4.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy4 {
txt.print_uwhex(galaxy4.seed[1], true) txt.print_uwhex(galaxy4.seed[1], true)
txt.print("\ngalaxy4 seed2=") txt.print("\ngalaxy4 seed2=")
txt.print_uwhex(galaxy4.seed[2], true) txt.print_uwhex(galaxy4.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet4 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf5 {
util5.print_10s(ship5.cash) util5.print_10s(ship5.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader5 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader5 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market5 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet5.print_name_uppercase() planet5.print_name_uppercase()
txt.print(" trade market5:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market5:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market5 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship5.cargohold[ci]) txt.print_ub(ship5.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy5 {
txt.print_uwhex(galaxy5.seed[1], true) txt.print_uwhex(galaxy5.seed[1], true)
txt.print("\ngalaxy5 seed2=") txt.print("\ngalaxy5 seed2=")
txt.print_uwhex(galaxy5.seed[2], true) txt.print_uwhex(galaxy5.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet5 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf6 {
util6.print_10s(ship6.cash) util6.print_10s(ship6.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader6 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader6 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market6 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet6.print_name_uppercase() planet6.print_name_uppercase()
txt.print(" trade market6:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market6:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market6 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship6.cargohold[ci]) txt.print_ub(ship6.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy6 {
txt.print_uwhex(galaxy6.seed[1], true) txt.print_uwhex(galaxy6.seed[1], true)
txt.print("\ngalaxy6 seed2=") txt.print("\ngalaxy6 seed2=")
txt.print_uwhex(galaxy6.seed[2], true) txt.print_uwhex(galaxy6.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet6 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf7 {
util7.print_10s(ship7.cash) util7.print_10s(ship7.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader7 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader7 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market7 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet7.print_name_uppercase() planet7.print_name_uppercase()
txt.print(" trade market7:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market7:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market7 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship7.cargohold[ci]) txt.print_ub(ship7.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy7 {
txt.print_uwhex(galaxy7.seed[1], true) txt.print_uwhex(galaxy7.seed[1], true)
txt.print("\ngalaxy7 seed2=") txt.print("\ngalaxy7 seed2=")
txt.print_uwhex(galaxy7.seed[2], true) txt.print_uwhex(galaxy7.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet7 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf8 {
util8.print_10s(ship8.cash) util8.print_10s(ship8.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader8 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader8 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market8 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet8.print_name_uppercase() planet8.print_name_uppercase()
txt.print(" trade market8:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market8:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market8 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship8.cargohold[ci]) txt.print_ub(ship8.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy8 {
txt.print_uwhex(galaxy8.seed[1], true) txt.print_uwhex(galaxy8.seed[1], true)
txt.print("\ngalaxy8 seed2=") txt.print("\ngalaxy8 seed2=")
txt.print_uwhex(galaxy8.seed[2], true) txt.print_uwhex(galaxy8.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet8 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ perf9 {
util9.print_10s(ship9.cash) util9.print_10s(ship9.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader9 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader9 {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market9 {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet9.print_name_uppercase() planet9.print_name_uppercase()
txt.print(" trade market9:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market9:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market9 {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship9.cargohold[ci]) txt.print_ub(ship9.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy9 {
txt.print_uwhex(galaxy9.seed[1], true) txt.print_uwhex(galaxy9.seed[1], true)
txt.print("\ngalaxy9 seed2=") txt.print("\ngalaxy9 seed2=")
txt.print_uwhex(galaxy9.seed[2], true) txt.print_uwhex(galaxy9.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet9 {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -36,7 +36,7 @@ textparse {
; simulate user always having at least one space at the start ; simulate user always having at least one space at the start
input_line[0] = ' ' input_line[0] = ' '
input_length = txt.input_chars(&input_line+1) input_length = txt.input_chars(&input_line+1)
txt.chrout('\n') txt.nl()
if not input_length { if not input_length {
txt.print("exit\n") txt.print("exit\n")
@ -109,12 +109,12 @@ textparse {
if instr_ptr { if instr_ptr {
; txt.print("instr: ") ; txt.print("instr: ")
; txt.print(instr_ptr) ; txt.print(instr_ptr)
; txt.chrout('\n') ; txt.nl()
; if operand_ptr { ; if operand_ptr {
; txt.print("operand: ") ; txt.print("operand: ")
; txt.print(operand_ptr) ; txt.print(operand_ptr)
; txt.chrout('\n') ; txt.nl()
; } ; }
assemble_instruction(instr_ptr, operand_ptr) assemble_instruction(instr_ptr, operand_ptr)
@ -136,7 +136,7 @@ textparse {
} }
; txt.print("(debug:) addr.mode: ") ; txt.print("(debug:) addr.mode: ")
; txt.print_ub(addr_mode) ; txt.print_ub(addr_mode)
; txt.chrout('\n') ; txt.nl()
txt.chrout(' ') txt.chrout(' ')
txt.print_uwhex(program_counter, 1) txt.print_uwhex(program_counter, 1)
txt.print(" ") txt.print(" ")
@ -147,7 +147,7 @@ textparse {
emit(lsb(cx16.r0)) emit(lsb(cx16.r0))
emit(msb(cx16.r0)) emit(msb(cx16.r0))
} }
txt.chrout('\n') txt.nl()
} }
} else { } else {
txt.print("?instruction error\n") txt.print("?instruction error\n")
@ -167,7 +167,7 @@ textparse {
txt.print(symbolname_ptr) txt.print(symbolname_ptr)
txt.chrout('=') txt.chrout('=')
txt.print_uwhex(value, true) txt.print_uwhex(value, true)
txt.chrout('\n') txt.nl()
} }
sub lowercase(uword st) { sub lowercase(uword st) {
@ -270,7 +270,7 @@ textparse {
txt.print(optr) txt.print(optr)
txt.print(" -> value: ") txt.print(" -> value: ")
txt.print_uwhex(cx16.r0, true) txt.print_uwhex(cx16.r0, true)
txt.chrout('\n') txt.nl()
} }
} }
@ -322,7 +322,7 @@ textparse {
txt.print(word_ptr) txt.print(word_ptr)
txt.print("] ") txt.print("] ")
} }
txt.chrout('\n') txt.nl()
} }
sub preprocess_assignment_spacing() { sub preprocess_assignment_spacing() {

View File

@ -63,7 +63,7 @@ benchmark {
if current_time<100 if current_time<100
txt.chrout('0') txt.chrout('0')
txt.print_uw(current_time) txt.print_uw(current_time)
txt.chrout('\n') txt.nl()
} }
} }

View File

@ -53,7 +53,7 @@ main {
sub attempt_load(uword filenameptr) { sub attempt_load(uword filenameptr) {
;txt.print(">> ") ;txt.print(">> ")
;txt.print(filenameptr) ;txt.print(filenameptr)
;txt.chrout('\n') ;txt.nl()
uword extension = filenameptr + rfind(filenameptr, '.') uword extension = filenameptr + rfind(filenameptr, '.')
if string.compare(extension, ".iff")==0 { if string.compare(extension, ".iff")==0 {
;txt.print("loading ") ;txt.print("loading ")

View File

@ -36,7 +36,7 @@ main {
txt.color2(1, max_iter-iter) txt.color2(1, max_iter-iter)
txt.chrout(' ') txt.chrout(' ')
} }
txt.chrout('\n') txt.nl()
} }
} }
} }

View File

@ -8,7 +8,7 @@ main {
sub start() { sub start() {
txt.print("showing the full directory of drive 8:\n") txt.print("showing the full directory of drive 8:\n")
void diskio.directory(8) void diskio.directory(8)
txt.chrout('\n') txt.nl()
if diskio.lf_start_list(8, "cub*") { if diskio.lf_start_list(8, "cub*") {
txt.print("\nfiles starting with 'cub':\n") txt.print("\nfiles starting with 'cub':\n")

View File

@ -23,10 +23,10 @@ main {
txt.print(", ") txt.print(", ")
amount++ amount++
} }
txt.chrout('\n') txt.nl()
txt.print("number of primes (expected 54): ") txt.print("number of primes (expected 54): ")
txt.print_ub(amount) txt.print_ub(amount)
txt.chrout('\n') txt.nl()
; test_stack.test() ; test_stack.test()
} }

View File

@ -45,26 +45,26 @@ main {
txt.print_ub(ub) txt.print_ub(ub)
txt.chrout(',') txt.chrout(',')
} }
txt.chrout('\n') txt.nl()
for uw in uwa { for uw in uwa {
txt.print_uw(uw) txt.print_uw(uw)
txt.chrout(',') txt.chrout(',')
} }
txt.chrout('\n') txt.nl()
for bb in ba { for bb in ba {
txt.print_b(bb) txt.print_b(bb)
txt.chrout(',') txt.chrout(',')
} }
txt.chrout('\n') txt.nl()
for ww in wa { for ww in wa {
txt.print_w(ww) txt.print_w(ww)
txt.chrout(',') txt.chrout(',')
} }
txt.chrout('\n') txt.nl()
txt.chrout('\n') txt.nl()
} }
} }
} }

View File

@ -7,27 +7,8 @@
main { main {
sub start() { sub start() {
ubyte zero=0 txt.print("yo")
ubyte ub txt.nl()
sys.clear_carry()
sys.clear_irqd()
ub = sys.read_flags()
txt.print_ubbin(ub,1)
txt.chrout('\n')
sys.clear_carry()
ub = zero+sys.read_flags()+zero
txt.print_ubbin(ub,1)
txt.chrout('\n')
sys.set_carry()
sys.set_irqd()
ub = sys.read_flags()
txt.print_ubbin(ub,1)
txt.chrout('\n')
sys.set_carry()
ub = zero+sys.read_flags()+zero
txt.print_ubbin(ub,1)
txt.chrout('\n')
test_stack.test() test_stack.test()
@ -140,10 +121,10 @@ main {
txt.print_uwbin(value, true) txt.print_uwbin(value, true)
txt.print(" #") txt.print(" #")
txt.print_uw(cx16.r15) ; number of chars processedc txt.print_uw(cx16.r15) ; number of chars processedc
txt.chrout('\n') txt.nl()
} }
txt.chrout('\n') txt.nl()
for strptr in hexstrings { for strptr in hexstrings {
value = conv.hex2uword(strptr) value = conv.hex2uword(strptr)
txt.print(strptr) txt.print(strptr)
@ -153,10 +134,10 @@ main {
txt.print_uwhex(value, true) txt.print_uwhex(value, true)
txt.print(" #") txt.print(" #")
txt.print_uw(cx16.r15) ; number of chars processedc txt.print_uw(cx16.r15) ; number of chars processedc
txt.chrout('\n') txt.nl()
} }
txt.chrout('\n') txt.nl()
for strptr in posdecstrings { for strptr in posdecstrings {
value = conv.str2uword(strptr) value = conv.str2uword(strptr)
txt.print(strptr) txt.print(strptr)
@ -164,10 +145,10 @@ main {
txt.print_uw(value) txt.print_uw(value)
txt.print(" #") txt.print(" #")
txt.print_uw(cx16.r15) ; number of chars processedc txt.print_uw(cx16.r15) ; number of chars processedc
txt.chrout('\n') txt.nl()
} }
txt.chrout('\n') txt.nl()
for strptr in worddecstrings { for strptr in worddecstrings {
wvalue = conv.str2word(strptr) wvalue = conv.str2word(strptr)
txt.print(strptr) txt.print(strptr)
@ -175,34 +156,34 @@ main {
txt.print_w(wvalue) txt.print_w(wvalue)
txt.print(" #") txt.print(" #")
txt.print_uw(cx16.r15) ; number of chars processedc txt.print_uw(cx16.r15) ; number of chars processedc
txt.chrout('\n') txt.nl()
} }
; found = string.find("irmen de jong", ' ') ; found = string.find("irmen de jong", ' ')
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = string.find(" irmen-de-jong", ' ') ; found = string.find(" irmen-de-jong", ' ')
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = string.find("irmen-de-jong ", ' ') ; found = string.find("irmen-de-jong ", ' ')
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = string.find("irmen-de-jong", ' ') ; found = string.find("irmen-de-jong", ' ')
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = strfinds("irmen de jong", "de") ; found = strfinds("irmen de jong", "de")
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = strfinds("irmen de jong", "irmen") ; found = strfinds("irmen de jong", "irmen")
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = strfinds("irmen de jong", "jong") ; found = strfinds("irmen de jong", "jong")
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
; found = strfinds("irmen de jong", "de456") ; found = strfinds("irmen de jong", "de456")
; txt.print_uwhex(found, 1) ; txt.print_uwhex(found, 1)
; txt.chrout('\n') ; txt.nl()
} }
} }

View File

@ -35,7 +35,7 @@ main {
util.print_10s(ship.cash) util.print_10s(ship.cash)
txt.print("\nCommand (?=help): ") txt.print("\nCommand (?=help): ")
ubyte num_chars = txt.input_chars(input) ubyte num_chars = txt.input_chars(input)
txt.chrout('\n') txt.nl()
if num_chars { if num_chars {
when input[0] { when input[0] {
'?' -> { '?' -> {
@ -102,7 +102,7 @@ trader {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
return return
} }
@ -130,7 +130,7 @@ trader {
} else { } else {
txt.print("\ni/o error: ") txt.print("\ni/o error: ")
txt.print(diskio.status(8)) txt.print(diskio.status(8))
txt.chrout('\n') txt.nl()
} }
} }
@ -351,7 +351,7 @@ market {
sub display() { sub display() {
ubyte ci ubyte ci
txt.chrout('\n') txt.nl()
planet.print_name_uppercase() planet.print_name_uppercase()
txt.print(" trade market:\n COMMODITY / PRICE / AVAIL / IN HOLD\n") txt.print(" trade market:\n COMMODITY / PRICE / AVAIL / IN HOLD\n")
for ci in 0 to len(names)-1 { for ci in 0 to len(names)-1 {
@ -367,7 +367,7 @@ market {
} }
txt.print(" ") txt.print(" ")
txt.print_ub(ship.cargohold[ci]) txt.print_ub(ship.cargohold[ci])
txt.chrout('\n') txt.nl()
} }
} }
@ -604,7 +604,7 @@ galaxy {
txt.print_uwhex(galaxy.seed[1], true) txt.print_uwhex(galaxy.seed[1], true)
txt.print("\ngalaxy seed2=") txt.print("\ngalaxy seed2=")
txt.print_uwhex(galaxy.seed[2], true) txt.print_uwhex(galaxy.seed[2], true)
txt.chrout('\n') txt.nl()
} }
} }
@ -889,9 +889,9 @@ planet {
} else { } else {
txt.print("Human Colonials") txt.print("Human Colonials")
} }
txt.chrout('\n') txt.nl()
txt.print(soup()) txt.print(soup())
txt.chrout('\n') txt.nl()
} }
} }