10-27-2022, 06:06 PM
Should have appeared in the screenie of a real TRS-80 Model III, huh?
Code: (Select All)
option _explicit
dim as integer i, x, y, scw, sch, saiz
dim v as _unsigned integer
dim a$
scw = 1152
sch = 672
screen _newimage(scw, sch, 32)
saiz = 20
x = 0
y = 0
i = 0
read a$
do until a$ = "END"
v = val(a$)
block v, saiz, 2, 3, x, y, _rgb(128, 128, 128)
x = x + saiz
i = i + 1
if i > 63 then
i = 0
x = 0
y = y + saiz
end if
read a$
loop
sleep
system
''num = fake character code (bits will be checked)
''siz = point size of the whole "rectangle"
''wd = number of pixels across
''ht = number of pixels vertically
''xx, yy = coordinates of top-left corner (desired to avoid this and "co")
''co = 32-bit color value
''eg. TRS-80 monochrome graphics, wd = 2 and ht = 3, graphics 128 x 48
''for Tandy Coco as well "num" must start at zero but graphics chars started at CHR$(128)
sub block (num as _unsigned integer, siz as integer, wd as integer, ht as integer, xx as single, yy as single, co as long)
static as integer x, y, k
static as _byte p
static as long m
static as single w, h
w = siz / wd
h = siz / ht
p = 0
for y = 0 to ht - 1
for x = 0 to wd - 1
m = 2 ^ p
if num and m then
line(xx + x * w, yy + y * h)-step(w, h), co, bf
end if
p = p + 1
next
next
end sub
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B110000,&B110000,&B110000
DATA &B110000,&B010000,&B000000,&B001011,&B111100,&B110100,&B000000
DATA &B101010,&B010000,&B011010,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B010101,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B111000,&B111110,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111100,&B111110,&B111111
DATA &B111101,&B110010,&B111101,&B010000,&B001011,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B010000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B101010,&B100001,&B111111,&B000101,&B010000
DATA &B101011,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B010000,&B000010
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111101,&B010000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B111110,&B101010,&B010101,&B000000
DATA &B000011,&B100010,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111101
DATA &B000000,&B000010,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111101,&B010000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B111111,&B000010,&B110101
DATA &B000000,&B000000,&B101010,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B010101,&B000000,&B001010,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B110100,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B111111,&B010100
DATA &B101011,&B110100,&B110011,&B111110,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B010100,&B010000,&B001011,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B010101,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B111111
DATA &B111101,&B111110,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B100010
DATA &B111111,&B111111,&B111111,&B111111,&B111101,&B110000,&B110000
DATA &B111011,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B011111
DATA &B000111,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B110100,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B001000,&B001100,&B101110
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B101111,&B111111,&B111111,&B010111
DATA &B101010,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B011111,&B000011
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B111111,&B110100,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B101010,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111110,&B111111,&B111111
DATA &B110111,&B101010,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B011111,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B111111,&B111111,&B110100,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B111010,&B111111,&B111111,&B000111,&B000001,&B001111
DATA &B101111,&B111111,&B111111,&B111111,&B110111,&B111000,&B111111
DATA &B111111,&B110101,&B111010,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B011111
DATA &B101111,&B111111,&B111111,&B111111,&B111111,&B011111,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B111111,&B111111,&B111111,&B111101
DATA &B010000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B101010,&B111111,&B000001,&B010100,&B000000
DATA &B000000,&B101010,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B000000,&B000000,&B000010,&B000011,&B000011,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111101,&B110000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000010,&B000111,&B001010,&B000101
DATA &B000000,&B000000,&B001110,&B001111,&B001111,&B001111,&B000011
DATA &B110011,&B111000,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B110101,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111100
DATA &B110000,&B010000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000010
DATA &B110011,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B010100,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111101,&B111100,&B111100
DATA &B111100,&B111100,&B111100,&B111100,&B111100,&B111110,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B010000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B110100,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111111,&B111111,&B111111
DATA &B111111,&B111111,&B111111,&B111111,&B111100,&B110000,&B110000
DATA &B110000,&B110000,&B110000,&B110000,&B110000,&B111100,&B111100
DATA &B010000,&B000000,&B000000,&B000000,&B000000,&B000000,&B000000
DATA &B000000,&B000000,END