Toolbox-1/source/regnatix/18-tdemo.spin

83 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2014-05-03 10:52:31 +02:00
CON
OBJ
ios : "reg-ios"
PUB start | c,i,j
ios.start
ios.printcls
ios.printnl
ios.print(string(" 0123456789ABCDEF0123456789ABCDEF"))
ios.printnl
ios.print(string(" ┌────────────────────────────────┐"))
repeat i from 0 to 7
ios.printnl
ios.printhex(i*j,2)
ios.printchar("│")
repeat j from 0 to 31
ios.printqchar((i*31)+j)
ios.printchar("│")
ios.printnl
ios.print(string(" └────────────────────────────────┘"))
ios.printnl
ios.curoff
repeat
ios.setcolor(1)
ios.cursetx(3)
ios.cursety(12)
ios.printhex(i++,8)
ios.setcolor(2)
ios.cursetx(15)
ios.cursety(12)
ios.printhex(cnt,8)
ios.setcolor(3)
ios.cursetx(27)
ios.cursety(12)
ios.printhex(cnt>>8,8)
ios.setcolor(5)
ios.cursetx(3)
ios.cursety(13)
ios.printhex(cnt>>2,8)
ios.setcolor(6)
ios.cursetx(15)
ios.cursety(13)
ios.printhex(cnt>>4,8)
ios.setcolor(7)
ios.cursetx(27)
ios.cursety(13)
ios.printhex(cnt>>6,8)
ios.setcolor(4)
ios.printnl
ios.printnl
ios.printtab
ios.print(string("Dec : "))
ios.printdec(i)
ios.printnl
ios.printtab
ios.print(string("Hex : "))
ios.printhex(i,8)
ios.printnl
ios.printtab
ios.print(string("Bin : "))
ios.printbin(i,32)
until ios.key
ios.setcolor(0)
ios.curon
ios.stop