SHOW:
|
|
- or go back to the newest paste.
1 | dim pf_row = a | |
2 | dim pf_col = b | |
3 | dim ds_start_bit = c | |
4 | dim current_bit = d | |
5 | dim current_byte = e | |
6 | dim ds_byte = e | |
7 | dim ds_col = g | |
8 | dim ds_row = h | |
9 | ||
10 | printpf | |
11 | ||
12 | ds_byte = ds_col / 8 | |
13 | ds_byte = ds_row * 8 + ds_byte | |
14 | ds_start_bit = ds_col & 7 | |
15 | ||
16 | - | for pf_row = 0 to 11 |
16 | + | for pf_row = 0 to 10 |
17 | current_bit = setbits[ds_start_bit] | |
18 | current_byte = map[ds_byte] | |
19 | ||
20 | for pf_col = 0 to 31 | |
21 | if current_byte & current_bit then pfpixel pf_col pf_row on else pfpixel pf_col pf_row off | |
22 | current_bit = current_bit / 2 | |
23 | ||
24 | rem if current_bit = 0 then done with one | |
25 | rem data statement byte so go to the next | |
26 | rem get the corresponding map byte | |
27 | rem and reset current_bit to the first bit column | |
28 | if current_bit = 0 then ds_byte = ds_byte + 1 : current_byte = map[ds_byte] : current_bit = $80 | |
29 | next | |
30 | ||
31 | rem we have incremented ds_byte by 4 | |
32 | rem in the pf_col loop | |
33 | rem 8 bytes per data statement row | |
34 | rem we need to advance 4 more to go to the | |
35 | rem next row in the data statement | |
36 | ds_byte = ds_byte + 4 | |
37 | next | |
38 | ||
39 | ||
40 | data setbits | |
41 | %10000000, %01000000, %00100000, %00010000 | |
42 | %00001000, %00000100, %00000010, %00000001 | |
43 | end | |
44 | ||
45 | data map | |
46 | %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111 | |
47 | %10000000, %00000000, %00000000, %00000001, %10000000, %00000000, %00000000, %00000001 | |
48 | %10100000, %00000000, %00111111, %11111001, %10100000, %00000000, %00111111, %11111001 | |
49 | %10100000, %00100000, %00100000, %00110001, %10100000, %00100000, %00100000, %00110001 | |
50 | %10100000, %00100000, %00100000, %11000001, %10100000, %00100000, %00100000, %11000001 | |
51 | %10100000, %00101111, %11100011, %00000001, %10100000, %00100001, %11100011, %00000001 | |
52 | %10100000, %00111000, %00001100, %00000001, %10100000, %00000000, %00001100, %00000001 | |
53 | %10100000, %00000000, %00110000, %00000001, %10100000, %00000000, %00110000, %00000001 | |
54 | %10111111, %11111111, %11000000, %00000001, %10111111, %11000001, %11000000, %00000001 | |
55 | %10000000, %00000000, %00000000, %00000001, %10000000, %00000000, %00000000, %00000001 | |
56 | %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111 | |
57 | %10101010, %01010101, %01010101, %01010100, %01010101, %01010001, %01010101, %01010101 | |
58 | %10000000, %00000000, %00000000, %00000001, %00000000, %00000000, %00000000, %00000001 | |
59 | %10000000, %00000000, %00000001, %10000001, %00100000, %00000000, %00111111, %11111001 | |
60 | %10000000, %00100000, %00000000, %00110001, %00100000, %00100000, %00100000, %00110001 | |
61 | %10000000, %00100000, %00000000, %11000001, %00100000, %00100000, %00100000, %11000001 | |
62 | %10000000, %00101111, %10000011, %00000001, %00100000, %00100111, %11100011, %00000001 | |
63 | %10000000, %00111000, %00000000, %00000001, %00100000, %00111000, %00001100, %00000001 | |
64 | %10000000, %00000000, %00000000, %00000001, %00100000, %00000000, %00110000, %00000001 | |
65 | %10000000, %11111111, %00000000, %00000001, %10000011, %10000011, %11000000, %00000001 | |
66 | %10000000, %00000000, %00000000, %00000001, %10000000, %00000000, %00000000, %00000001 | |
67 | %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111 | |
68 | end |