Compare commits
No commits in common. 'master' and 'floats' have entirely different histories.
@ -1,72 +0,0 @@ |
||||
use std::{fmt, cmp}; |
||||
use std::fmt::{Formatter, Debug}; |
||||
|
||||
/// Position in the input string
|
||||
#[derive(PartialEq, Clone, Default)] |
||||
pub struct SourcePosition { |
||||
/// The line number on which the error occurred.
|
||||
pub line: u32, |
||||
/// The column number on which the error occurred.
|
||||
pub column: u32, |
||||
/// The index in the given string which caused the error.
|
||||
pub index: u32, |
||||
/// File index if there are multiple files
|
||||
pub file: u32, |
||||
} |
||||
|
||||
impl fmt::Display for SourcePosition { |
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { |
||||
write!(f, "{}:{}", self.line, self.column) |
||||
} |
||||
} |
||||
|
||||
impl SourcePosition { |
||||
pub fn with_file(mut self, file: u32) -> Self { |
||||
self.file = file; |
||||
self |
||||
} |
||||
} |
||||
|
||||
impl Debug for SourcePosition { |
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { |
||||
if f.alternate() { |
||||
f.debug_struct("SourcePosition") |
||||
.field("line", &self.line) |
||||
.field("column", &self.column) |
||||
.field("index", &self.index) |
||||
.field("file", &self.file) |
||||
.finish() |
||||
} else { |
||||
// shorter version
|
||||
write!(f, "Pos({}|{}:{})", self.file, self.line, self.column) |
||||
} |
||||
} |
||||
} |
||||
|
||||
pub(crate) fn get_line_and_column(s: &str, pos: usize) -> SourcePosition { |
||||
let mut line: usize = 1; |
||||
let mut col: isize = -1; |
||||
for c in s.chars().take(pos + 1) { |
||||
if c == '\n' { |
||||
line += 1; |
||||
col = -1; |
||||
} else { |
||||
col += 1; |
||||
} |
||||
} |
||||
SourcePosition { |
||||
line: line as u32, |
||||
column: cmp::max(col, 0) as u32, |
||||
index: pos as u32, |
||||
file: 0 |
||||
} |
||||
} |
||||
|
||||
/// Build a span
|
||||
pub(crate) fn spos(s: &str, pos: usize) -> SourcePosition { |
||||
if pos >= s.len() { |
||||
Default::default() |
||||
} else { |
||||
get_line_and_column(s, pos) |
||||
} |
||||
} |
@ -1,38 +0,0 @@ |
||||
( |
||||
(lds @cout "main\n") |
||||
(msleep 500) |
||||
(lds @cout "main\n") |
||||
(msleep 500) |
||||
|
||||
(lds @cout "Spawnign bg\n") |
||||
|
||||
(spawn r15 bg 10) |
||||
|
||||
(msleep 500) |
||||
(lds @cout "FG\n") |
||||
(msleep 500) |
||||
(lds @cout "FG\n") |
||||
(msleep 500) |
||||
(lds @cout "FG\n") |
||||
|
||||
(msleep 1000) |
||||
|
||||
(lds @cout "Wait for BG\n") |
||||
(join @r15) |
||||
(lds @cout "Joined\n") |
||||
(msleep 500) |
||||
(lds @cout "main\n") |
||||
(msleep 500) |
||||
(lds @cout "main\n") |
||||
(msleep 500) |
||||
|
||||
(proc bg times |
||||
(ld r0 times) |
||||
(:x) |
||||
(msleep 500) |
||||
(lds @cout "***BG\n") |
||||
(dec r0 (nz? (j :x))) |
||||
(lds @cout "***BG done.\n") |
||||
(ret) |
||||
) |
||||
) |
@ -1,44 +0,0 @@ |
||||
( |
||||
; using a coroutine as a generator |
||||
|
||||
(spawn r15 fibo) |
||||
|
||||
(ld r0 20) |
||||
(:next) |
||||
|
||||
(ld r1 @r15) ; Read a yielded value |
||||
(call printnum r1) |
||||
(lds @cout ", ") |
||||
|
||||
(dec r0) |
||||
(j.nz :next) |
||||
(ld @cout '\n') |
||||
(halt) |
||||
|
||||
(proc fibo |
||||
(ld r0 0) |
||||
(ld r1 1) |
||||
(:x) |
||||
(yield r1) |
||||
(add r2 r0 r1) |
||||
(ld r0 r1) |
||||
(ld r1 r2) |
||||
(j :x) |
||||
) |
||||
|
||||
(proc printnum num |
||||
(mkbf r15) |
||||
(ld r1 num) |
||||
(tst r1 (<0? (mul r1 -1))) |
||||
(:next) |
||||
(mod r0 r1 10) |
||||
(add r0 '0') |
||||
(bfrpush @r15 r0) |
||||
(div r1 10 (z? |
||||
(tst num (<0? (bfrpush @r15 '-'))) |
||||
(lds @cout @r15) |
||||
(del @r15) |
||||
(ret))) |
||||
(j :next) |
||||
) |
||||
) |
@ -1,44 +0,0 @@ |
||||
( |
||||
; This example shows the use of critical sections. |
||||
|
||||
; Set short timeslice (50us) to make the effect more pronounced |
||||
(rt-opt RT_TIMESLICE 50) |
||||
|
||||
(spawn _ unsafe 'A' 'Z') |
||||
(spawn _ unsafe 'a' 'z') |
||||
(spawn _ safe '0' '9') ; Notice that the sequence 0-9 is always printed in its entirety - because it is in a critical section |
||||
(msleep 200) |
||||
(halt) |
||||
|
||||
(proc unsafe start end |
||||
; This can be interrupted any time |
||||
(:x) |
||||
(yield) |
||||
(ld r0 start) |
||||
(:l) |
||||
(ld @cout r0) |
||||
(cmp r0 end) |
||||
(j.eq :x) |
||||
(inc r0) |
||||
(j :l) |
||||
) |
||||
|
||||
(proc safe start end |
||||
(:again) |
||||
(ld r0 start) |
||||
; The sequence will always be complete |
||||
(crit |
||||
(ld @cout ' ') ; space to make it easier to read |
||||
(:l) |
||||
(ld @cout r0) |
||||
(cmp r0 end) |
||||
(j.eq :x) |
||||
(inc r0) |
||||
(j :l) |
||||
(:x) |
||||
(ld @cout ' ') ; space to make it easier to read |
||||
) |
||||
(yield) |
||||
(j :again) |
||||
) |
||||
) |
@ -1,17 +0,0 @@ |
||||
( |
||||
; This demo shows that stdin is nearly non-blocking |
||||
|
||||
(spawn _ ReadAndEcho) |
||||
|
||||
(:a) |
||||
(mslp 2500) |
||||
(lds @cout "Tick\n") |
||||
(j :a) |
||||
|
||||
(proc ReadAndEcho |
||||
(:a) |
||||
(ld @cout '?') |
||||
(ld @cout @cin) |
||||
(j :a) |
||||
) |
||||
) |
@ -1,15 +0,0 @@ |
||||
( |
||||
(def A 10) |
||||
(def FOO (=add A (sub 10 5))) |
||||
|
||||
; FOO is 15 |
||||
|
||||
(ld r0 (=add 14 1)) |
||||
(cmp r0 15 (ne? (fault "1"))) |
||||
|
||||
(ld r0 (=add FOO 1)) |
||||
(cmp r0 16 (ne? (fault "2"))) |
||||
|
||||
(ld r0 (=add (sub FOO 2) 3)) |
||||
(cmp r0 16 (ne? (fault "3"))) |
||||
) |
@ -1,6 +0,0 @@ |
||||
( |
||||
(ld r0 5) |
||||
(:next) |
||||
(rng r1 0 1 (z? (lds @cout "(1€)\n")) (else? (lds @cout "(::)\n"))) |
||||
(dec r0 (nz? (j :next))) |
||||
) |
@ -1 +0,0 @@ |
||||
a.out |
@ -1,7 +0,0 @@ |
||||
.PHONY: run |
||||
|
||||
run: a.out |
||||
./a.out > font.csn
|
||||
|
||||
a.out: convert.c font.xbm |
||||
cc convert.c
|
@ -1,3 +0,0 @@ |
||||
This is a demo of producing font data for use in CRSN programs. |
||||
|
||||
The source font was obtained from a .FON file using psftools |
@ -1,40 +0,0 @@ |
||||
// Convert the xbm file to crsn
|
||||
|
||||
#include <stdlib.h> |
||||
#include <stdio.h> |
||||
#include <stdint.h> |
||||
#include "font.xbm" |
||||
|
||||
void main() { |
||||
uint64_t digits[256]; |
||||
printf("(sym FONT r15)\n"); |
||||
printf("(mkbf FONT (\n"); |
||||
for (int ch = 0; ch < 256; ch++) { |
||||
uint64_t symbol = 0; |
||||
for(int row = 0; row<8;row++) { |
||||
symbol <<= 8ull; |
||||
unsigned char slice = psf_bits[row*32 + (ch/32)*(32*8) + (ch%32)]; |
||||
symbol |= slice; |
||||
/* // show the symbol
|
||||
printf(" ; "); |
||||
for(int j=0;j<8;j++) { |
||||
if(slice&0x1) { |
||||
printf("█"); |
||||
} else { |
||||
printf(" "); |
||||
} |
||||
slice >>= 1; |
||||
} |
||||
printf("\n"); |
||||
//*/
|
||||
} |
||||
digits[ch] = symbol; |
||||
printf(" 0x%016lx ; %d", symbol, ch); |
||||
if (ch >= 32 && ch <= 126) { |
||||
printf(" '%c'\n", ch); |
||||
} else { |
||||
printf("\n", ch); |
||||
} |
||||
} |
||||
printf("))\n"); |
||||
} |
@ -1,259 +0,0 @@ |
||||
(sym FONT r15) |
||||
(mkbf FONT ( |
||||
0x0000000000000000 ; 0 |
||||
0x7e81a581bd99817e ; 1 |
||||
0x7effdbffc3e7ff7e ; 2 |
||||
0x367f7f7f3e1c0800 ; 3 |
||||
0x081c3e7f3e1c0800 ; 4 |
||||
0x1c3e1c7f7f3e1c3e ; 5 |
||||
0x08081c3e7f3e1c3e ; 6 |
||||
0x0000183c3c180000 ; 7 |
||||
0xffffe7c3c3e7ffff ; 8 |
||||
0x003c664242663c00 ; 9 |
||||
0xffc399bdbd99c3ff ; 10 |
||||
0xf0e0f0be3333331e ; 11 |
||||
0x3c6666663c187e18 ; 12 |
||||
0xfcccfc0c0c0e0f07 ; 13 |
||||
0xfec6fec6c6e66703 ; 14 |
||||
0x995a3ce7e73c5a99 ; 15 |
||||
0x01071f7f1f070100 ; 16 |
||||
0x40707c7f7c704000 ; 17 |
||||
0x183c7e18187e3c18 ; 18 |
||||
0x6666666666006600 ; 19 |
||||
0xfedbdbded8d8d800 ; 20 |
||||
0x7cc61c36361c331e ; 21 |
||||
0x000000007e7e7e00 ; 22 |
||||
0x183c7e187e3c18ff ; 23 |
||||
0x183c7e1818181800 ; 24 |
||||
0x181818187e3c1800 ; 25 |
||||
0x0018307f30180000 ; 26 |
||||
0x000c067f060c0000 ; 27 |
||||
0x00000303037f0000 ; 28 |
||||
0x002466ff66240000 ; 29 |
||||
0x00183c7effff0000 ; 30 |
||||
0x00ffff7e3c180000 ; 31 |
||||
0x0000000000000000 ; 32 ' ' |
||||
0x0c1e1e0c0c000c00 ; 33 '!' |
||||
0x3636360000000000 ; 34 '"' |
||||
0x36367f367f363600 ; 35 '#' |
||||
0x0c3e031e301f0c00 ; 36 '$' |
||||
0x006333180c666300 ; 37 '%' |
||||
0x1c361c6e3b336e00 ; 38 '&' |
||||
0x0606030000000000 ; 39 ''' |
||||
0x180c0606060c1800 ; 40 '(' |
||||
0x060c1818180c0600 ; 41 ')' |
||||
0x00663cff3c660000 ; 42 '*' |
||||
0x000c0c3f0c0c0000 ; 43 '+' |
||||
0x00000000000c0c06 ; 44 ',' |
||||
0x0000003f00000000 ; 45 '-' |
||||
0x00000000000c0c00 ; 46 '.' |
||||
0x6030180c06030100 ; 47 '/' |
||||
0x3e63737b6f673e00 ; 48 '0' |
||||
0x0c0e0c0c0c0c3f00 ; 49 '1' |
||||
0x1e33301c06333f00 ; 50 '2' |
||||
0x1e33301c30331e00 ; 51 '3' |
||||
0x383c36337f307800 ; 52 '4' |
||||
0x3f031f3030331e00 ; 53 '5' |
||||
0x1c06031f33331e00 ; 54 '6' |
||||
0x3f3330180c0c0c00 ; 55 '7' |
||||
0x1e33331e33331e00 ; 56 '8' |
||||
0x1e33333e30180e00 ; 57 '9' |
||||
0x000c0c00000c0c00 ; 58 ':' |
||||
0x000c0c00000c0c06 ; 59 ';' |
||||
0x180c0603060c1800 ; 60 '<' |
||||
0x00003f00003f0000 ; 61 '=' |
||||
0x060c1830180c0600 ; 62 '>' |
||||
0x1e3330180c000c00 ; 63 '?' |
||||
0x3e637b7b7b031e00 ; 64 '@' |
||||
0x0c1e33333f333300 ; 65 'A' |
||||
0x3f66663e66663f00 ; 66 'B' |
||||
0x3c66030303663c00 ; 67 'C' |
||||
0x1f36666666361f00 ; 68 'D' |
||||
0x7f46161e16467f00 ; 69 'E' |
||||
0x7f46161e16060f00 ; 70 'F' |
||||
0x3c66030373667c00 ; 71 'G' |
||||
0x3333333f33333300 ; 72 'H' |
||||
0x1e0c0c0c0c0c1e00 ; 73 'I' |
||||
0x7830303033331e00 ; 74 'J' |
||||
0x6766361e36666700 ; 75 'K' |
||||
0x0f06060646667f00 ; 76 'L' |
||||
0x63777f7f6b636300 ; 77 'M' |
||||
0x63676f7b73636300 ; 78 'N' |
||||
0x1c36636363361c00 ; 79 'O' |
||||
0x3f66663e06060f00 ; 80 'P' |
||||
0x1e3333333b1e3800 ; 81 'Q' |
||||
0x3f66663e36666700 ; 82 'R' |
||||
0x1e33070e38331e00 ; 83 'S' |
||||
0x3f2d0c0c0c0c1e00 ; 84 'T' |
||||
0x3333333333333f00 ; 85 'U' |
||||
0x33333333331e0c00 ; 86 'V' |
||||
0x6363636b7f776300 ; 87 'W' |
||||
0x6363361c1c366300 ; 88 'X' |
||||
0x3333331e0c0c1e00 ; 89 'Y' |
||||
0x7f6331184c667f00 ; 90 'Z' |
||||
0x1e06060606061e00 ; 91 '[' |
||||
0x03060c1830604000 ; 92 '\' |
||||
0x1e18181818181e00 ; 93 ']' |
||||
0x081c366300000000 ; 94 '^' |
||||
0x00000000000000ff ; 95 '_' |
||||
0x0c0c180000000000 ; 96 '`' |
||||
0x00001e303e336e00 ; 97 'a' |
||||
0x0706063e66663b00 ; 98 'b' |
||||
0x00001e3303331e00 ; 99 'c' |
||||
0x3830303e33336e00 ; 100 'd' |
||||
0x00001e333f031e00 ; 101 'e' |
||||
0x1c36060f06060f00 ; 102 'f' |
||||
0x00006e33333e301f ; 103 'g' |
||||
0x0706366e66666700 ; 104 'h' |
||||
0x0c000e0c0c0c1e00 ; 105 'i' |
||||
0x300030303033331e ; 106 'j' |
||||
0x070666361e366700 ; 107 'k' |
||||
0x0e0c0c0c0c0c1e00 ; 108 'l' |
||||
0x0000337f7f6b6300 ; 109 'm' |
||||
0x00001f3333333300 ; 110 'n' |
||||
0x00001e3333331e00 ; 111 'o' |
||||
0x00003b66663e060f ; 112 'p' |
||||
0x00006e33333e3078 ; 113 'q' |
||||
0x00003b6e66060f00 ; 114 'r' |
||||
0x00003e031e301f00 ; 115 's' |
||||
0x080c3e0c0c2c1800 ; 116 't' |
||||
0x0000333333336e00 ; 117 'u' |
||||
0x00003333331e0c00 ; 118 'v' |
||||
0x0000636b7f7f3600 ; 119 'w' |
||||
0x000063361c366300 ; 120 'x' |
||||
0x00003333333e301f ; 121 'y' |
||||
0x00003f190c263f00 ; 122 'z' |
||||
0x380c0c070c0c3800 ; 123 '{' |
||||
0x1818180018181800 ; 124 '|' |
||||
0x070c0c380c0c0700 ; 125 '}' |
||||
0x6e3b000000000000 ; 126 '~' |
||||
0x00081c3663637f00 ; 127 |
||||
0x1e3303331e18301e ; 128 |
||||
0x0033003333337e00 ; 129 |
||||
0x38001e333f031e00 ; 130 |
||||
0x7ec33c607c66fc00 ; 131 |
||||
0x33001e303e337e00 ; 132 |
||||
0x07001e303e337e00 ; 133 |
||||
0x0c0c1e303e337e00 ; 134 |
||||
0x00001e03031e301c ; 135 |
||||
0x7ec33c667e063c00 ; 136 |
||||
0x33001e333f031e00 ; 137 |
||||
0x07001e333f031e00 ; 138 |
||||
0x33000e0c0c0c1e00 ; 139 |
||||
0x3e631c1818183c00 ; 140 |
||||
0x07000e0c0c0c1e00 ; 141 |
||||
0x631c36637f636300 ; 142 |
||||
0x0c0c001e333f3300 ; 143 |
||||
0x38003f061e063f00 ; 144 |
||||
0x0000fe30fe33fe00 ; 145 |
||||
0x7c36337f33337300 ; 146 |
||||
0x1e33001e33331e00 ; 147 |
||||
0x0033001e33331e00 ; 148 |
||||
0x0007001e33331e00 ; 149 |
||||
0x1e33003333337e00 ; 150 |
||||
0x0007003333337e00 ; 151 |
||||
0x00330033333e301f ; 152 |
||||
0xc3183c66663c1800 ; 153 |
||||
0x3300333333331e00 ; 154 |
||||
0x18187e03037e1818 ; 155 |
||||
0x1c36260f06673f00 ; 156 |
||||
0x33331e3f0c3f0c0c ; 157 |
||||
0x1f33335f63f363e3 ; 158 |
||||
0x70d8183c18181b0e ; 159 |
||||
0x38001e303e337e00 ; 160 |
||||
0x1c000e0c0c0c1e00 ; 161 |
||||
0x0038001e33331e00 ; 162 |
||||
0x0038003333337e00 ; 163 |
||||
0x001f001f33333300 ; 164 |
||||
0x3f0033373f3b3300 ; 165 |
||||
0x3c36367c007e0000 ; 166 |
||||
0x1c36361c003e0000 ; 167 |
||||
0x0c000c0603331e00 ; 168 |
||||
0x0000003f03030000 ; 169 |
||||
0x0000003f30300000 ; 170 |
||||
0xc363337bcc6633f0 ; 171 |
||||
0xc36333dbecf6f3c0 ; 172 |
||||
0x1818001818181800 ; 173 |
||||
0x00cc663366cc0000 ; 174 |
||||
0x003366cc66330000 ; 175 |
||||
0x4411441144114411 ; 176 |
||||
0xaa55aa55aa55aa55 ; 177 |
||||
0xdbeedb77dbeedb77 ; 178 |
||||
0x1818181818181818 ; 179 |
||||
0x181818181f181818 ; 180 |
||||
0x18181f181f181818 ; 181 |
||||
0x6c6c6c6c6f6c6c6c ; 182 |
||||
0x000000007f6c6c6c ; 183 |
||||
0x00001f181f181818 ; 184 |
||||
0x6c6c6f606f6c6c6c ; 185 |
||||
0x6c6c6c6c6c6c6c6c ; 186 |
||||
0x00007f606f6c6c6c ; 187 |
||||
0x6c6c6f607f000000 ; 188 |
||||
0x6c6c6c6c7f000000 ; 189 |
||||
0x18181f181f000000 ; 190 |
||||
0x000000001f181818 ; 191 |
||||
0x18181818f8000000 ; 192 |
||||
0x18181818ff000000 ; 193 |
||||
0x00000000ff181818 ; 194 |
||||
0x18181818f8181818 ; 195 |
||||
0x00000000ff000000 ; 196 |
||||
0x18181818ff181818 ; 197 |
||||
0x1818f818f8181818 ; 198 |
||||
0x6c6c6c6cec6c6c6c ; 199 |
||||
0x6c6cec0cfc000000 ; 200 |
||||
0x0000fc0cec6c6c6c ; 201 |
||||
0x6c6cef00ff000000 ; 202 |
||||
0x0000ff00ef6c6c6c ; 203 |
||||
0x6c6cec0cec6c6c6c ; 204 |
||||
0x0000ff00ff000000 ; 205 |
||||
0x6c6cef00ef6c6c6c ; 206 |
||||
0x1818ff00ff000000 ; 207 |
||||
0x6c6c6c6cff000000 ; 208 |
||||
0x0000ff00ff181818 ; 209 |
||||
0x00000000ff6c6c6c ; 210 |
||||
0x6c6c6c6cfc000000 ; 211 |
||||
0x1818f818f8000000 ; 212 |
||||
0x0000f818f8181818 ; 213 |
||||
0x00000000fc6c6c6c ; 214 |
||||
0x6c6c6c6cff6c6c6c ; 215 |
||||
0x1818ff18ff181818 ; 216 |
||||
0x181818181f000000 ; 217 |
||||
0x00000000f8181818 ; 218 |
||||
0xffffffffffffffff ; 219 |
||||
0x00000000ffffffff ; 220 |
||||
0x0f0f0f0f0f0f0f0f ; 221 |
||||
0xf0f0f0f0f0f0f0f0 ; 222 |
||||
0xffffffff00000000 ; 223 |
||||
0x00006e3b133b6e00 ; 224 |
||||
0x001e331f331f0303 ; 225 |
||||
0x003f330303030300 ; 226 |
||||
0x007f363636363600 ; 227 |
||||
0x3f33060c06333f00 ; 228 |
||||
0x00007e1b1b1b0e00 ; 229 |
||||
0x00666666663e0603 ; 230 |
||||
0x006e3b1818181800 ; 231 |
||||
0x3f0c1e33331e0c3f ; 232 |
||||
0x1c36637f63361c00 ; 233 |
||||
0x1c36636336367700 ; 234 |
||||
0x380c183e33331e00 ; 235 |
||||
0x00007edbdb7e0000 ; 236 |
||||
0x60307edbdb7e0603 ; 237 |
||||
0x1c06031f03061c00 ; 238 |
||||
0x1e33333333333300 ; 239 |
||||
0x003f003f003f0000 ; 240 |
||||
0x0c0c3f0c0c003f00 ; 241 |
||||
0x060c180c06003f00 ; 242 |
||||
0x180c060c18003f00 ; 243 |
||||
0x70d8d81818181818 ; 244 |
||||
0x18181818181b1b0e ; 245 |
||||
0x0c0c003f000c0c00 ; 246 |
||||
0x006e3b006e3b0000 ; 247 |
||||
0x1c36361c00000000 ; 248 |
||||
0x0000001818000000 ; 249 |
||||
0x0000000018000000 ; 250 |
||||
0xf030303037363c38 ; 251 |
||||
0x1e36363636000000 ; 252 |
||||
0x0e180c061e000000 ; 253 |
||||
0x00003c3c3c3c0000 ; 254 |
||||
0x0000000000000000 ; 255 |
||||
)) |
@ -1,174 +0,0 @@ |
||||
#define psf_width 256 |
||||
#define psf_height 64 |
||||
static unsigned char psf_bits[] = { |
||||
0x00, 0x7e, 0x7e, 0x36, 0x08, 0x1c, 0x08, 0x00, 0xff, 0x00, 0xff, 0xf0, |
||||
0x3c, 0xfc, 0xfe, 0x99, 0x01, 0x40, 0x18, 0x66, 0xfe, 0x7c, 0x00, 0x18, |
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xff, 0x7f, |
||||
0x1c, 0x3e, 0x08, 0x00, 0xff, 0x3c, 0xc3, 0xe0, 0x66, 0xcc, 0xc6, 0x5a, |
||||
0x07, 0x70, 0x3c, 0x66, 0xdb, 0xc6, 0x00, 0x3c, 0x3c, 0x18, 0x18, 0x0c, |
||||
0x00, 0x24, 0x18, 0xff, 0x00, 0xa5, 0xdb, 0x7f, 0x3e, 0x1c, 0x1c, 0x18, |
||||
0xe7, 0x66, 0x99, 0xf0, 0x66, 0xfc, 0xfe, 0x3c, 0x1f, 0x7c, 0x7e, 0x66, |
||||
0xdb, 0x1c, 0x00, 0x7e, 0x7e, 0x18, 0x30, 0x06, 0x03, 0x66, 0x3c, 0xff, |
||||
0x00, 0x81, 0xff, 0x7f, 0x7f, 0x7f, 0x3e, 0x3c, 0xc3, 0x42, 0xbd, 0xbe, |
||||
0x66, 0x0c, 0xc6, 0xe7, 0x7f, 0x7f, 0x18, 0x66, 0xde, 0x36, 0x00, 0x18, |
||||
0x18, 0x18, 0x7f, 0x7f, 0x03, 0xff, 0x7e, 0x7e, 0x00, 0xbd, 0xc3, 0x3e, |
||||
0x3e, 0x7f, 0x7f, 0x3c, 0xc3, 0x42, 0xbd, 0x33, 0x3c, 0x0c, 0xc6, 0xe7, |
||||
0x1f, 0x7c, 0x18, 0x66, 0xd8, 0x36, 0x7e, 0x7e, 0x18, 0x7e, 0x30, 0x06, |
||||
0x03, 0x66, 0xff, 0x3c, 0x00, 0x99, 0xe7, 0x1c, 0x1c, 0x3e, 0x3e, 0x18, |
||||
0xe7, 0x66, 0x99, 0x33, 0x18, 0x0e, 0xe6, 0x3c, 0x07, 0x70, 0x7e, 0x00, |
||||
0xd8, 0x1c, 0x7e, 0x3c, 0x18, 0x3c, 0x18, 0x0c, 0x7f, 0x24, 0xff, 0x18, |
||||
0x00, 0x81, 0xff, 0x08, 0x08, 0x1c, 0x1c, 0x00, 0xff, 0x3c, 0xc3, 0x33, |
||||
0x7e, 0x0f, 0x67, 0x5a, 0x01, 0x40, 0x3c, 0x66, 0xd8, 0x33, 0x7e, 0x18, |
||||
0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, |
||||
0x00, 0x3e, 0x3e, 0x00, 0xff, 0x00, 0xff, 0x1e, 0x18, 0x07, 0x03, 0x99, |
||||
0x00, 0x00, 0x18, 0x00, 0x00, 0x1e, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x36, 0x36, 0x0c, 0x00, 0x1c, 0x06, |
||||
0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3e, 0x0c, 0x1e, 0x1e, |
||||
0x38, 0x3f, 0x1c, 0x3f, 0x1e, 0x1e, 0x00, 0x00, 0x18, 0x00, 0x06, 0x1e, |
||||
0x00, 0x1e, 0x36, 0x36, 0x3e, 0x63, 0x36, 0x06, 0x0c, 0x0c, 0x66, 0x0c, |
||||
0x00, 0x00, 0x00, 0x30, 0x63, 0x0e, 0x33, 0x33, 0x3c, 0x03, 0x06, 0x33, |
||||
0x33, 0x33, 0x0c, 0x0c, 0x0c, 0x00, 0x0c, 0x33, 0x00, 0x1e, 0x36, 0x7f, |
||||
0x03, 0x33, 0x1c, 0x03, 0x06, 0x18, 0x3c, 0x0c, 0x00, 0x00, 0x00, 0x18, |
||||
0x73, 0x0c, 0x30, 0x30, 0x36, 0x1f, 0x03, 0x30, 0x33, 0x33, 0x0c, 0x0c, |
||||
0x06, 0x3f, 0x18, 0x30, 0x00, 0x0c, 0x00, 0x36, 0x1e, 0x18, 0x6e, 0x00, |
||||
0x06, 0x18, 0xff, 0x3f, 0x00, 0x3f, 0x00, 0x0c, 0x7b, 0x0c, 0x1c, 0x1c, |
||||
0x33, 0x30, 0x1f, 0x18, 0x1e, 0x3e, 0x00, 0x00, 0x03, 0x00, 0x30, 0x18, |
||||
0x00, 0x0c, 0x00, 0x7f, 0x30, 0x0c, 0x3b, 0x00, 0x06, 0x18, 0x3c, 0x0c, |
||||
0x00, 0x00, 0x00, 0x06, 0x6f, 0x0c, 0x06, 0x30, 0x7f, 0x30, 0x33, 0x0c, |
||||
0x33, 0x30, 0x00, 0x00, 0x06, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x36, |
||||
0x1f, 0x66, 0x33, 0x00, 0x0c, 0x0c, 0x66, 0x0c, 0x0c, 0x00, 0x0c, 0x03, |
||||
0x67, 0x0c, 0x33, 0x33, 0x30, 0x33, 0x33, 0x0c, 0x33, 0x18, 0x0c, 0x0c, |
||||
0x0c, 0x3f, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x36, 0x0c, 0x63, 0x6e, 0x00, |
||||
0x18, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x01, 0x3e, 0x3f, 0x3f, 0x1e, |
||||
0x78, 0x1e, 0x1e, 0x0c, 0x1e, 0x0e, 0x0c, 0x0c, 0x18, 0x00, 0x06, 0x0c, |
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x0c, 0x3f, 0x3c, |
||||
0x1f, 0x7f, 0x7f, 0x3c, 0x33, 0x1e, 0x78, 0x67, 0x0f, 0x63, 0x63, 0x1c, |
||||
0x3f, 0x1e, 0x3f, 0x1e, 0x3f, 0x33, 0x33, 0x63, 0x63, 0x33, 0x7f, 0x1e, |
||||
0x03, 0x1e, 0x08, 0x00, 0x63, 0x1e, 0x66, 0x66, 0x36, 0x46, 0x46, 0x66, |
||||
0x33, 0x0c, 0x30, 0x66, 0x06, 0x77, 0x67, 0x36, 0x66, 0x33, 0x66, 0x33, |
||||
0x2d, 0x33, 0x33, 0x63, 0x63, 0x33, 0x63, 0x06, 0x06, 0x18, 0x1c, 0x00, |
||||
0x7b, 0x33, 0x66, 0x03, 0x66, 0x16, 0x16, 0x03, 0x33, 0x0c, 0x30, 0x36, |
||||
0x06, 0x7f, 0x6f, 0x63, 0x66, 0x33, 0x66, 0x07, 0x0c, 0x33, 0x33, 0x63, |
||||
0x36, 0x33, 0x31, 0x06, 0x0c, 0x18, 0x36, 0x00, 0x7b, 0x33, 0x3e, 0x03, |
||||
0x66, 0x1e, 0x1e, 0x03, 0x3f, 0x0c, 0x30, 0x1e, 0x06, 0x7f, 0x7b, 0x63, |
||||
0x3e, 0x33, 0x3e, 0x0e, 0x0c, 0x33, 0x33, 0x6b, 0x1c, 0x1e, 0x18, 0x06, |
||||
0x18, 0x18, 0x63, 0x00, 0x7b, 0x3f, 0x66, 0x03, 0x66, 0x16, 0x16, 0x73, |
||||
0x33, 0x0c, 0x33, 0x36, 0x46, 0x6b, 0x73, 0x63, 0x06, 0x3b, 0x36, 0x38, |
||||
0x0c, 0x33, 0x33, 0x7f, 0x1c, 0x0c, 0x4c, 0x06, 0x30, 0x18, 0x00, 0x00, |
||||
0x03, 0x33, 0x66, 0x66, 0x36, 0x46, 0x06, 0x66, 0x33, 0x0c, 0x33, 0x66, |
||||
0x66, 0x63, 0x63, 0x36, 0x06, 0x1e, 0x66, 0x33, 0x0c, 0x33, 0x1e, 0x77, |
||||
0x36, 0x0c, 0x66, 0x06, 0x60, 0x18, 0x00, 0x00, 0x1e, 0x33, 0x3f, 0x3c, |
||||
0x1f, 0x7f, 0x0f, 0x7c, 0x33, 0x1e, 0x1e, 0x67, 0x7f, 0x63, 0x63, 0x1c, |
||||
0x0f, 0x38, 0x67, 0x1e, 0x1e, 0x3f, 0x0c, 0x63, 0x63, 0x1e, 0x7f, 0x1e, |
||||
0x40, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, |
||||
0x0c, 0x00, 0x07, 0x00, 0x38, 0x00, 0x1c, 0x00, 0x07, 0x0c, 0x30, 0x07, |
||||
0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x38, 0x18, 0x07, 0x6e, 0x00, 0x0c, 0x00, 0x06, 0x00, |
||||
0x30, 0x00, 0x36, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, |
||||
0x18, 0x0c, 0x3b, 0x08, 0x18, 0x1e, 0x06, 0x1e, 0x30, 0x1e, 0x06, 0x6e, |
||||
0x36, 0x0e, 0x30, 0x66, 0x0c, 0x33, 0x1f, 0x1e, 0x3b, 0x6e, 0x3b, 0x3e, |
||||
0x3e, 0x33, 0x33, 0x63, 0x63, 0x33, 0x3f, 0x0c, 0x18, 0x0c, 0x00, 0x1c, |
||||
0x00, 0x30, 0x3e, 0x33, 0x3e, 0x33, 0x0f, 0x33, 0x6e, 0x0c, 0x30, 0x36, |
||||
0x0c, 0x7f, 0x33, 0x33, 0x66, 0x33, 0x6e, 0x03, 0x0c, 0x33, 0x33, 0x6b, |
||||
0x36, 0x33, 0x19, 0x07, 0x00, 0x38, 0x00, 0x36, 0x00, 0x3e, 0x66, 0x03, |
||||
0x33, 0x3f, 0x06, 0x33, 0x66, 0x0c, 0x30, 0x1e, 0x0c, 0x7f, 0x33, 0x33, |
||||
0x66, 0x33, 0x66, 0x1e, 0x0c, 0x33, 0x33, 0x7f, 0x1c, 0x33, 0x0c, 0x0c, |
||||
0x18, 0x0c, 0x00, 0x63, 0x00, 0x33, 0x66, 0x33, 0x33, 0x03, 0x06, 0x3e, |
||||
0x66, 0x0c, 0x33, 0x36, 0x0c, 0x6b, 0x33, 0x33, 0x3e, 0x3e, 0x06, 0x30, |
||||
0x2c, 0x33, 0x1e, 0x7f, 0x36, 0x3e, 0x26, 0x0c, 0x18, 0x0c, 0x00, 0x63, |
||||
0x00, 0x6e, 0x3b, 0x1e, 0x6e, 0x1e, 0x0f, 0x30, 0x67, 0x1e, 0x33, 0x67, |
||||
0x1e, 0x63, 0x33, 0x1e, 0x06, 0x30, 0x0f, 0x1f, 0x18, 0x6e, 0x0c, 0x36, |
||||
0x63, 0x30, 0x3f, 0x38, 0x18, 0x07, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x0f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x38, 0x7e, 0x33, 0x07, 0x0c, 0x00, |
||||
0x7e, 0x33, 0x07, 0x33, 0x3e, 0x07, 0x63, 0x0c, 0x38, 0x00, 0x7c, 0x1e, |
||||
0x00, 0x00, 0x1e, 0x00, 0x00, 0xc3, 0x33, 0x18, 0x1c, 0x33, 0x1f, 0x70, |
||||
0x33, 0x33, 0x00, 0xc3, 0x00, 0x00, 0x0c, 0x00, 0xc3, 0x00, 0x00, 0x00, |
||||
0x63, 0x00, 0x1c, 0x0c, 0x00, 0x00, 0x36, 0x33, 0x33, 0x07, 0x33, 0x07, |
||||
0x33, 0x18, 0x00, 0x18, 0x36, 0x33, 0x33, 0xd8, 0x03, 0x00, 0x1e, 0x3c, |
||||
0x1e, 0x1e, 0x1e, 0x1e, 0x3c, 0x1e, 0x1e, 0x0e, 0x1c, 0x0e, 0x36, 0x00, |
||||
0x3f, 0xfe, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x33, 0x7e, |
||||
0x26, 0x1e, 0x33, 0x18, 0x33, 0x33, 0x33, 0x60, 0x30, 0x30, 0x30, 0x03, |
||||
0x66, 0x33, 0x33, 0x0c, 0x18, 0x0c, 0x63, 0x1e, 0x06, 0x30, 0x7f, 0x1e, |
||||
0x1e, 0x1e, 0x33, 0x33, 0x33, 0x66, 0x33, 0x03, 0x0f, 0x3f, 0x5f, 0x3c, |
||||
0x1e, 0x33, 0x3f, 0x7c, 0x3e, 0x3e, 0x3e, 0x03, 0x7e, 0x3f, 0x3f, 0x0c, |
||||
0x18, 0x0c, 0x7f, 0x33, 0x1e, 0xfe, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, |
||||
0x33, 0x66, 0x33, 0x03, 0x06, 0x0c, 0x63, 0x18, 0x18, 0x33, 0x03, 0x66, |
||||
0x33, 0x33, 0x33, 0x1e, 0x06, 0x03, 0x03, 0x0c, 0x18, 0x0c, 0x63, 0x3f, |
||||
0x06, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3e, 0x3c, 0x33, 0x7e, |
||||
0x67, 0x3f, 0xf3, 0x18, 0x30, 0x7e, 0x1e, 0xfc, 0x7e, 0x7e, 0x7e, 0x30, |
||||
0x3c, 0x1e, 0x1e, 0x1e, 0x3c, 0x1e, 0x63, 0x33, 0x3f, 0xfe, 0x73, 0x1e, |
||||
0x1e, 0x1e, 0x7e, 0x7e, 0x30, 0x18, 0x1e, 0x18, 0x3f, 0x0c, 0x63, 0x1b, |
||||
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x1f, 0x00, 0x00, 0x18, 0x00, 0x0c, 0xe3, 0x0e, 0x38, 0x1c, 0x00, 0x00, |
||||
0x00, 0x3f, 0x3c, 0x1c, 0x0c, 0x00, 0x00, 0xc3, 0xc3, 0x18, 0x00, 0x00, |
||||
0x44, 0xaa, 0xdb, 0x18, 0x18, 0x18, 0x6c, 0x00, 0x00, 0x6c, 0x6c, 0x00, |
||||
0x6c, 0x6c, 0x18, 0x00, 0x00, 0x00, 0x38, 0x38, 0x1f, 0x00, 0x36, 0x36, |
||||
0x00, 0x00, 0x00, 0x63, 0x63, 0x18, 0xcc, 0x33, 0x11, 0x55, 0xee, 0x18, |
||||
0x18, 0x18, 0x6c, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x6c, 0x6c, 0x18, 0x00, |
||||
0x1e, 0x0e, 0x00, 0x00, 0x00, 0x33, 0x36, 0x36, 0x0c, 0x00, 0x00, 0x33, |
||||
0x33, 0x00, 0x66, 0x66, 0x44, 0xaa, 0xdb, 0x18, 0x18, 0x1f, 0x6c, 0x00, |
||||
0x1f, 0x6f, 0x6c, 0x7f, 0x6f, 0x6c, 0x1f, 0x00, 0x30, 0x0c, 0x1e, 0x33, |
||||
0x1f, 0x37, 0x7c, 0x1c, 0x06, 0x3f, 0x3f, 0x7b, 0xdb, 0x18, 0x33, 0xcc, |
||||
0x11, 0x55, 0x77, 0x18, 0x18, 0x18, 0x6c, 0x00, 0x18, 0x60, 0x6c, 0x60, |
||||
0x60, 0x6c, 0x18, 0x00, 0x3e, 0x0c, 0x33, 0x33, 0x33, 0x3f, 0x00, 0x00, |
||||
0x03, 0x03, 0x30, 0xcc, 0xec, 0x18, 0x66, 0x66, 0x44, 0xaa, 0xdb, 0x18, |
||||
0x1f, 0x1f, 0x6f, 0x7f, 0x1f, 0x6f, 0x6c, 0x6f, 0x7f, 0x7f, 0x1f, 0x1f, |
||||
0x33, 0x0c, 0x33, 0x33, 0x33, 0x3b, 0x7e, 0x3e, 0x33, 0x03, 0x30, 0x66, |
||||
0xf6, 0x18, 0xcc, 0x33, 0x11, 0x55, 0xee, 0x18, 0x18, 0x18, 0x6c, 0x6c, |
||||
0x18, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x18, 0x7e, 0x1e, 0x1e, 0x7e, |
||||
0x33, 0x33, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x33, 0xf3, 0x18, 0x00, 0x00, |
||||
0x44, 0xaa, 0xdb, 0x18, 0x18, 0x18, 0x6c, 0x6c, 0x18, 0x6c, 0x6c, 0x6c, |
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x11, 0x55, 0x77, 0x18, |
||||
0x18, 0x18, 0x6c, 0x6c, 0x18, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x18, |
||||
0x18, 0x18, 0x00, 0x18, 0x00, 0x18, 0x18, 0x6c, 0x6c, 0x00, 0x6c, 0x00, |
||||
0x6c, 0x00, 0x6c, 0x18, 0x6c, 0x00, 0x00, 0x6c, 0x18, 0x00, 0x00, 0x6c, |
||||
0x18, 0x18, 0x00, 0xff, 0x00, 0x0f, 0xf0, 0xff, 0x18, 0x18, 0x00, 0x18, |
||||
0x00, 0x18, 0x18, 0x6c, 0x6c, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x6c, 0x18, |
||||
0x6c, 0x00, 0x00, 0x6c, 0x18, 0x00, 0x00, 0x6c, 0x18, 0x18, 0x00, 0xff, |
||||
0x00, 0x0f, 0xf0, 0xff, 0x18, 0x18, 0x00, 0x18, 0x00, 0x18, 0xf8, 0x6c, |
||||
0xec, 0xfc, 0xef, 0xff, 0xec, 0xff, 0xef, 0xff, 0x6c, 0xff, 0x00, 0x6c, |
||||
0xf8, 0xf8, 0x00, 0x6c, 0xff, 0x18, 0x00, 0xff, 0x00, 0x0f, 0xf0, 0xff, |
||||
0x18, 0x18, 0x00, 0x18, 0x00, 0x18, 0x18, 0x6c, 0x0c, 0x0c, 0x00, 0x00, |
||||
0x0c, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x6c, 0x18, 0x18, 0x00, 0x6c, |
||||
0x18, 0x18, 0x00, 0xff, 0x00, 0x0f, 0xf0, 0xff, 0xf8, 0xff, 0xff, 0xf8, |
||||
0xff, 0xff, 0xf8, 0xec, 0xfc, 0xec, 0xff, 0xef, 0xec, 0xff, 0xef, 0xff, |
||||
0xff, 0xff, 0xff, 0xfc, 0xf8, 0xf8, 0xfc, 0xff, 0xff, 0x1f, 0xf8, 0xff, |
||||
0xff, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x6c, |
||||
0x00, 0x6c, 0x00, 0x6c, 0x6c, 0x00, 0x6c, 0x00, 0x00, 0x18, 0x6c, 0x00, |
||||
0x00, 0x18, 0x6c, 0x6c, 0x18, 0x00, 0x18, 0xff, 0xff, 0x0f, 0xf0, 0x00, |
||||
0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x6c, 0x00, 0x6c, 0x00, 0x6c, |
||||
0x6c, 0x00, 0x6c, 0x00, 0x00, 0x18, 0x6c, 0x00, 0x00, 0x18, 0x6c, 0x6c, |
||||
0x18, 0x00, 0x18, 0xff, 0xff, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x18, 0x18, |
||||
0x00, 0x18, 0x18, 0x6c, 0x00, 0x6c, 0x00, 0x6c, 0x6c, 0x00, 0x6c, 0x00, |
||||
0x00, 0x18, 0x6c, 0x00, 0x00, 0x18, 0x6c, 0x6c, 0x18, 0x00, 0x18, 0xff, |
||||
0xff, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, |
||||
0x3f, 0x1c, 0x1c, 0x38, 0x00, 0x60, 0x1c, 0x1e, 0x00, 0x0c, 0x06, 0x18, |
||||
0x70, 0x18, 0x0c, 0x00, 0x1c, 0x00, 0x00, 0xf0, 0x1e, 0x0e, 0x00, 0x00, |
||||
0x00, 0x1e, 0x3f, 0x7f, 0x33, 0x00, 0x66, 0x6e, 0x0c, 0x36, 0x36, 0x0c, |
||||
0x00, 0x30, 0x06, 0x33, 0x3f, 0x0c, 0x0c, 0x0c, 0xd8, 0x18, 0x0c, 0x6e, |
||||
0x36, 0x00, 0x00, 0x30, 0x36, 0x18, 0x00, 0x00, 0x6e, 0x33, 0x33, 0x36, |
||||
0x06, 0x7e, 0x66, 0x3b, 0x1e, 0x63, 0x63, 0x18, 0x7e, 0x7e, 0x03, 0x33, |
||||
0x00, 0x3f, 0x18, 0x06, 0xd8, 0x18, 0x00, 0x3b, 0x36, 0x00, 0x00, 0x30, |
||||
0x36, 0x0c, 0x3c, 0x00, 0x3b, 0x1f, 0x03, 0x36, 0x0c, 0x1b, 0x66, 0x18, |
||||
0x33, 0x7f, 0x63, 0x3e, 0xdb, 0xdb, 0x1f, 0x33, 0x3f, 0x0c, 0x0c, 0x0c, |
||||
0x18, 0x18, 0x3f, 0x00, 0x1c, 0x18, 0x00, 0x30, 0x36, 0x06, 0x3c, 0x00, |
||||
0x13, 0x33, 0x03, 0x36, 0x06, 0x1b, 0x66, 0x18, 0x33, 0x63, 0x36, 0x33, |
||||
0xdb, 0xdb, 0x03, 0x33, 0x00, 0x0c, 0x06, 0x18, 0x18, 0x18, 0x00, 0x6e, |
||||
0x00, 0x18, 0x18, 0x37, 0x36, 0x1e, 0x3c, 0x00, 0x3b, 0x1f, 0x03, 0x36, |
||||
0x33, 0x1b, 0x3e, 0x18, 0x1e, 0x36, 0x36, 0x33, 0x7e, 0x7e, 0x06, 0x33, |
||||
0x3f, 0x00, 0x00, 0x00, 0x18, 0x1b, 0x0c, 0x3b, 0x00, 0x00, 0x00, 0x36, |
||||
0x00, 0x00, 0x3c, 0x00, 0x6e, 0x03, 0x03, 0x36, 0x3f, 0x0e, 0x06, 0x18, |
||||
0x0c, 0x1c, 0x77, 0x1e, 0x00, 0x06, 0x1c, 0x33, 0x00, 0x3f, 0x3f, 0x3f, |
||||
0x18, 0x1b, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, |
||||
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x3f, 0x00, 0x00, 0x00, |
||||
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, |
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00}; |
@ -1,18 +0,0 @@ |
||||
( |
||||
(include other) |
||||
(def BAR (=add FOO 1000)) |
||||
|
||||
(cmp BAR 1123 (ne? (fault))) |
||||
|
||||
(include utils/itoa.csn) |
||||
(include "utils/printnum") |
||||
|
||||
(mkbf r0) |
||||
(call itoa r0 BAR) |
||||
(lds @cout @r0) |
||||
(del @r0) |
||||
(ld @cout '\n') |
||||
|
||||
(call printnum BAR) |
||||
(ld @cout '\n') |
||||
) |
@ -1,3 +0,0 @@ |
||||
( |
||||
(def FOO 123) |
||||
) |
@ -1,14 +0,0 @@ |
||||
( |
||||
(proc itoa buf num |
||||
(ld r1 num) |
||||
(tst r1 (<0? (mul r1 -1))) |
||||
(:next) |
||||
(mod r0 r1 10) |
||||
(add r0 '0') |
||||
(bfrpush @buf r0) |
||||
(div r1 10 (z? |
||||
(tst num (<0? (bfrpush @buf '-'))) |
||||
(ret))) |
||||
(j :next) |
||||
) |
||||
) |
@ -1,17 +0,0 @@ |
||||
( |
||||
(proc printnum num |
||||
(mkbf r15) |
||||
(ld r1 num) |
||||
(tst r1 (<0? (mul r1 -1))) |
||||
(:next) |
||||
(mod r0 r1 10) |
||||
(add r0 '0') |
||||
(bfrpush @r15 r0) |
||||
(div r1 10 (z? |
||||
(tst num (<0? (bfrpush @r15 '-'))) |
||||
(lds @cout @r15) |
||||
(del @r15) |
||||
(ret))) |
||||
(j :next) |
||||
) |
||||
) |
@ -1,236 +0,0 @@ |
||||
( |
||||
; simple GOL with screen and a buffer + DRAWING!!! |
||||
|
||||
; Middle-click to payse or resume |
||||
; (hold the button until paused - there is a sleep between generations and checking buttons) |
||||
; |
||||
; When paused, draw with left (white) and right (black) mouse buttons |
||||
; |
||||
; Resume by clicking middle again. |
||||
|
||||
(def GENERATION_MS 200) |
||||
|
||||
; Number of pixels |
||||
(def W 40) |
||||
(def H 40) |
||||
(def UPSCALE 10) |
||||
|
||||
; --- end of config --- |
||||
|
||||
; Real pixel size |
||||
(sc-init (=mul UPSCALE W) (=mul UPSCALE H)) |
||||
; Upscaling factor (bug pixels) |
||||
(sc-opt SCREEN_UPSCALE UPSCALE) |
||||
|
||||
(def XMAX (=sub W 1)) |
||||
(def YMAX (=sub H 1)) |
||||
(def NCELLS (=mul W H)) |
||||
|
||||
(sc-opt SCREEN_AUTO_BLIT 0) |
||||
|
||||
(sc-erase 0) ; all black |
||||
(sym ng g15) |
||||
(mkbf ng NCELLS) |
||||
|
||||
; one glider |
||||
(bfwr @ng 1 1) |
||||
(bfwr @ng 42 1) |
||||
(bfwr @ng 80 1) |
||||
(bfwr @ng 81 1) |
||||
(bfwr @ng 82 1) |
||||
|
||||
; another glider |
||||
(bfwr @ng 16 1) |
||||
(bfwr @ng 55 1) |
||||
(bfwr @ng 95 1) |
||||
(bfwr @ng 96 1) |
||||
(bfwr @ng 97 1) |
||||
|
||||
(:loop) |
||||
(sc-poll) |
||||
|
||||
; Drawing |
||||
(sc-mbtn _ MBTN_MID |
||||
(nz? |
||||
(:release) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
(sc-mbtn _ MBTN_MID (nz? (j :release))) |
||||
|
||||
(:mousing) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
|
||||
(ld r3 -1) |
||||
|
||||
(sc-mbtn _ MBTN_LEFT) |
||||
(ld.nz r3 1) |
||||
(sc-mbtn _ MBTN_RIGHT) |
||||
(ld.nz r3 0) |
||||
|
||||
(tst r3 (nneg? |
||||
(sc-mouse r0 r1) |
||||
|
||||
(tst r3) |
||||
(sc-wr.nz r0 r1 #ffffff) |
||||
(sc-wr.z r0 r1 #000000) |
||||
|
||||
(sc-blit) |
||||
(mul r1 W) |
||||
(add r0 r1) |
||||
(ld8 r3:8 r3) |
||||
(bfwr @ng r0 r3) |
||||
)) |
||||
|
||||
(sc-mbtn _ MBTN_MID |
||||
(z? (j :mousing))) |
||||
|
||||
(:release2) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
(sc-mbtn _ MBTN_MID (nz? (j :release2))) |
||||
) |
||||
) |
||||
|
||||
(call Display) |
||||
(sc-blit) |
||||
(mslp GENERATION_MS) |
||||
(j :loop) |
||||
|
||||
(proc CountNeighbors x y |
||||
(sym xx r4) |
||||
(sym yy r5) |
||||
(sym i r6) |
||||
(sym count r7) |
||||
|
||||
; yeah this sucks. it's correct, though |
||||
|
||||
(:a) |
||||
(add yy y -1 (neg? (j :d))) |
||||
(add xx x -1 (neg? (j :b))) |
||||
(mul i yy W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:b) |
||||
(mul i yy W) |
||||
(add i x) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:c) |
||||
(add xx x 1) |
||||
(cmp xx W (ge? (j :d))) |
||||
(mul i yy W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:d) |
||||
(add xx x -1 (neg? (j :f))) |
||||
(mul i y W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
; there is no E |
||||
|
||||
(:f) |
||||
(add xx x 1) |
||||
(cmp xx W (ge? (j :g))) |
||||
(mul i y W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:g) |
||||
(add yy y 1) |
||||
(cmp yy H (ge? (j :end))) |
||||
(add xx x -1 (neg? (j :h))) |
||||
(mul i yy W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:h) |
||||
(add yy y 1) |
||||
(cmp yy H (ge? (j :end))) |
||||
(mul i yy W) |
||||
(add i x) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:i) |
||||
(add yy y 1) |
||||
(cmp yy H (ge? (j :end))) |
||||
(add xx x 1) |
||||
(cmp xx W (ge? (j :end))) |
||||
(mul i yy W) |
||||
(add i xx) |
||||
(bfrd r0 @ng i) |
||||
(and r0 0xFF (nz? (inc count))) |
||||
|
||||
(:end) |
||||
(ret count) |
||||
) |
||||
|
||||
(proc Display |
||||
; display and calc next gen |
||||
(sym x r4) |
||||
(sym y r5) |
||||
(sym i r6) |
||||
(:next) |
||||
; The lower byte contains 0 or 1 |
||||
; the second byte will be filled with the next gen |
||||
|
||||
(bfrd r0 @ng i) |
||||
|
||||
; Show this gen |
||||
(and r0 0xFF |
||||
(nz? (sc-wr x y 0xffffff)) |
||||
(z? (sc-wr x y 0x000000))) |
||||
|
||||
(call CountNeighbors x y) |
||||
|
||||
; stay: 2,3 |
||||
; die: >3 |
||||
; born: 3 |
||||
|
||||
(cmp res0 2 |
||||
(eq? (ld8 r0:8 r0)) ; stasis |
||||
(ne? |
||||
(tst r0 |
||||
(z? |
||||
(cmp res0 3 (eq? (ld8 r0:8 1))) ; birth |
||||
) |
||||
(nz? |
||||
(cmp res0 3 (eq? (ld8 r0:8 1))) ; stay alive |
||||
) |
||||
) |
||||
) |
||||
) |
||||
|
||||
(bfwr @ng i r0) |
||||
|
||||
(inc i) |
||||
(inc x) |
||||
(cmp x W |
||||
(ne? (j :next))) |
||||
(ld x 0) |
||||
(inc y) |
||||
(cmp y H |
||||
(eq? (j :next2))) |
||||
(j :next) |
||||
|
||||
; Shift all by 8 to the right (generation shift) |
||||
(:next2) |
||||
(dec i) |
||||
(bfrd r0 @ng i) |
||||
(lsr r0 8) |
||||
(bfwr @ng i r0) |
||||
(tst i) |
||||
(j.nz :next2) |
||||
(ret) |
||||
) |
||||
) |
@ -1,43 +0,0 @@ |
||||
( |
||||
; Unlabeled loop. Can be exited by jumping out |
||||
|
||||
(loop |
||||
(nop) |
||||
(nop) |
||||
(nop) |
||||
) |
||||
|
||||
(barrier) |
||||
|
||||
; The above is equivalent to: |
||||
|
||||
(:label) |
||||
(nop) |
||||
(nop) |
||||
(nop) |
||||
(j :label) |
||||
|
||||
(barrier) |
||||
|
||||
; The label name can be specified. |
||||
; This adds a start label and ":label-end" at the end of the loop: |
||||
|
||||
(loop :repeat |
||||
(nop) |
||||
(nop) |
||||
(j :repeat-end) |
||||
(nop) |
||||
) |
||||
|
||||
(barrier) |
||||
|
||||
; The above is equivalent to: (labels changed to avoid a compile error) |
||||
|
||||
(:repeat2) |
||||
(nop) |
||||
(nop) |
||||
(j :repeat2-end) |
||||
(nop) |
||||
(j :repeat2) |
||||
(:repeat2-end) |
||||
) |
@ -1,87 +0,0 @@ |
||||
( |
||||
(def W 128) |
||||
(def H 48) |
||||
(def MAXITER 50) |
||||
|
||||
(sym asciigr r10) |
||||
|
||||
(mkbf asciigr ( |
||||
'.' ',' ':' '+' '=' '%' '@' '#' |
||||
'$' '&' '*' '|' '-' ':' '.' ' ' |
||||
)) |
||||
|
||||
(sym x r7) |
||||
(sym y r8) |
||||
(:row) |
||||
(:col) |
||||
(call pixel x y) |
||||
(sub r0 MAXITER 1) |
||||
(rcmp res0 1 r0 |
||||
(eq? |
||||
(mod r0 res0 16) |
||||
(bfrd @cout @asciigr r0) |
||||
) |
||||
(else? |
||||
(ld @cout ' ') |
||||
) |
||||
) |
||||
(sc-wr x y r0) |
||||
(inc x) |
||||
(cmp x W) |
||||
(j.ne :col) |
||||
(ld x 0) |
||||
(inc y) |
||||
(ld @cout '\n') |
||||
(cmp y H) |
||||
(j.ne :row) |
||||
|
||||
(halt) |
||||
|
||||
(proc pixel xi yi |
||||
(sym x0 r7) |
||||
(sym y0 r8) |
||||
(itf x0 xi) |
||||
(itf y0 yi) |
||||
|
||||
; Scale to the interesting range |
||||
(itf r0 W) |
||||
(itf r1 H) |
||||
|
||||
(fdiv x0 r0) |
||||
(fmul x0 3.5) |
||||
(fsub x0 2.5) |
||||
|
||||
(fdiv y0 r1) |
||||
(fmul y0 2.4) |
||||
(fsub y0 1.2) |
||||
|
||||
(sym x r5) |
||||
(sym y r6) |
||||
(ld x 0.0) |
||||
(ld y 0.0) |
||||
(sym iter r4) |
||||
|
||||
(:iter) |
||||
(cmp iter MAXITER) |
||||
(j.eq :end) |
||||
(fmul r0 x x) |
||||
(fmul r1 y y) |
||||
(fadd r2 r1) |
||||
(fcmp r2 4.0) |
||||
(j.gt :end) |
||||
|
||||
(fsub r2 r0 r1) |
||||
(fadd r2 x0) |
||||
|
||||
(fmul r0 x y) |
||||
(fmul r0 2.0) |
||||
(fadd r0 y0) |
||||
(ld y r0) |
||||
(ld x r2) |
||||
(inc iter) |
||||
(j :iter) |
||||
|
||||
(:end) |
||||
(ret iter) |
||||
) |
||||
) |
@ -1,95 +0,0 @@ |
||||
( |
||||
; High resolution mandelbrot |
||||
|
||||
(def W 800) |
||||
(def H 600) |
||||
(def MAXITER 50) ; Increase for more detail but slower render |
||||
|
||||
(sc-init W H) |
||||
(sc-opt SCREEN_AUTOBLIT 0) |
||||
|
||||
(sym gradient r9) |
||||
(sym asciigr r10) |
||||
|
||||
(mkbf gradient ( |
||||
0x421e0f 0x19071a 0x09012f 0x040449 0x000764 0x0c2c8a 0x1852b1 0x397dd1 |
||||
0x86b5e5 0xd3ecf8 0xf1e9bf 0xf8c95f 0xffaa00 0xcc8000 0x995700 0x6a3403)) |
||||
|
||||
(sym x r7) |
||||
(sym y r8) |
||||
(:row) |
||||
(:col) |
||||
(call pixel x y) |
||||
(sub r0 MAXITER 1) |
||||
(rcmp res0 1 r0 |
||||
(eq? |
||||
(mod r0 res0 16) |
||||
(bfrd r0 @gradient r0) |
||||
) |
||||
(else? (ld r0 0)) |
||||
) |
||||
(sc-wr x y r0) |
||||
(inc x) |
||||
(cmp x W) |
||||
(j.ne :col) |
||||
(ld x 0) |
||||
(inc y) |
||||
(sc-blit) ; Render after every row |
||||
(cmp y H) |
||||
(j.ne :row) |
||||
|
||||
;(sc-blit) |
||||
|
||||
(:slp) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
(j :slp) |
||||
|
||||
(proc pixel xi yi |
||||
(sym x0 r7) |
||||
(sym y0 r8) |
||||
(itf x0 xi) |
||||
(itf y0 yi) |
||||
|
||||
; Scale to the interesting range x -2.5..1 and y -1..1 |
||||
(itf r0 W) |
||||
(itf r1 H) |
||||
|
||||
(fdiv x0 r0) |
||||
(fmul x0 3.5) |
||||
(fsub x0 2.5) |
||||
|
||||
(fdiv y0 r1) |
||||
(fmul y0 2.4) |
||||
(fsub y0 1.2) |
||||
|
||||
(sym x r5) |
||||
(sym y r6) |
||||
(ld x 0.0) |
||||
(ld y 0.0) |
||||
(sym iter r4) |
||||
|
||||
(:iter) |
||||
(cmp iter MAXITER) |
||||
(j.eq :end) |
||||
(fmul r0 x x) |
||||
(fmul r1 y y) |
||||
(fadd r2 r1) |
||||
(fcmp r2 4.0) |
||||
(j.gt :end) |
||||
|
||||
(fsub r2 r0 r1) |
||||
(fadd r2 x0) |
||||
|
||||
(fmul r0 x y) |
||||
(fmul r0 2.0) |
||||
(fadd r0 y0) |
||||
(ld y r0) |
||||
(ld x r2) |
||||
(inc iter) |
||||
(j :iter) |
||||
|
||||
(:end) |
||||
(ret iter) |
||||
) |
||||
) |
@ -1,305 +0,0 @@ |
||||
( |
||||
(def W 1024) |
||||
(def H 768) |
||||
(def DEF_MAXITER 50) |
||||
|
||||
; --- |
||||
|
||||
(sc-init W H) |
||||
(sc-opt SCREEN_AUTOBLIT 0) |
||||
(sym maxiter g0) |
||||
|
||||
(ld maxiter DEF_MAXITER) |
||||
|
||||
(lds @cout "Interactive Mandelbrot\n") |
||||
(lds @cout "----------------------\n") |
||||
(lds @cout "Navigate using WASD, zoom: Q+/E-, detail: R+/F-; fast move/zoom: LShift, force redraw: G\n") |
||||
(lds @cout "To get a high-res image, stop interacting for while\n") |
||||
|
||||
(sym mb_x r7) |
||||
(sym mb_y r8) |
||||
(sym mb_s r9) |
||||
(sym mb_row r10) |
||||
|
||||
; index into the skip/size table |
||||
(sym mb_skip_index r11) |
||||
|
||||
; Interactive movement speed |
||||
(def ZOOM_STEP 0.1) |
||||
(def PAN_STEP 0.3) |
||||
|
||||
; size of big pixels |
||||
(def COL_SKIP 8) |
||||
(def ROW_SKIP 8) |
||||
; incrementally renders 1x1, 2x2, 4x4, ... |
||||
(def MB_SKIP_TABLE_SIZE 80) |
||||
(def MB_SKIP_REPEAT_INDEX 16) |
||||
(sym mb_skip_table_x r12) |
||||
(sym mb_skip_table_y r13) |
||||
(sym mb_size_table r14) |
||||
(mkbf mb_skip_table_x ( |
||||
0 4 0 4 2 6 0 2 4 6 2 6 0 2 4 6 |
||||
; 8x8 grid |
||||
1 3 5 7 1 3 5 7 1 3 5 7 1 3 5 7 |
||||
0 2 4 6 0 2 4 6 0 2 4 6 0 2 4 6 |
||||
1 3 5 7 1 3 5 7 1 3 5 7 1 3 5 7 |
||||
; do top left pixels again |
||||
0 2 4 6 0 2 4 6 0 2 4 6 0 2 4 6 |
||||
)) |
||||
(mkbf mb_skip_table_y ( |
||||
0 0 4 4 0 0 2 2 2 2 4 4 6 6 6 6 |
||||
; 8x8 grid |
||||
0 0 0 0 2 2 2 2 4 4 4 4 6 6 6 6 |
||||
1 1 1 1 3 3 3 3 5 5 5 5 7 7 7 7 |
||||
1 1 1 1 3 3 3 3 5 5 5 5 7 7 7 7 |
||||
; do top left pixels again |
||||
0 0 0 0 2 2 2 2 4 4 4 4 6 6 6 6 |
||||
)) |
||||
(mkbf mb_size_table ( |
||||
8 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 |
||||
; 8x8 grid |
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |
||||
; do top left pixels again |
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |
||||
)) |
||||
|
||||
(ld mb_x 0.0) |
||||
(ld mb_y 0.0) |
||||
(ld mb_s 1.0) |
||||
(sym did_change r15) |
||||
(sym is_first_render r6) |
||||
(ld is_first_render 1) |
||||
|
||||
(sym GRADIENT g1) |
||||
(mkbf GRADIENT ( |
||||
0x421e0f 0x19071a 0x09012f 0x040449 0x000764 0x0c2c8a 0x1852b1 0x397dd1 |
||||
0x86b5e5 0xd3ecf8 0xf1e9bf 0xf8c95f 0xffaa00 0xcc8000 0x995700 0x6a3403)) |
||||
|
||||
; render row |
||||
; size - pixel size |
||||
; col - column offset |
||||
; px - offset x |
||||
; py - offset y |
||||
; scale - scaling |
||||
; row - row position |
||||
(proc render_row size col px py scale row |
||||
(sym x r7) |
||||
(sym y r8) |
||||
(add y row) |
||||
(ld x col) |
||||
(:col) |
||||
(call pixel x y px py scale) |
||||
(sub r0 maxiter 1) |
||||
(rcmp res0 1 r0 |
||||
(eq? |
||||
(mod r0 res0 16) |
||||
(bfrd r0 @GRADIENT r0) |
||||
) |
||||
(else? (ld r0 0)) |
||||
) |
||||
(sc-rect x y size size r0) |
||||
(add x COL_SKIP) |
||||
(cmp x W) |
||||
(j.lt :col) |
||||
(sc-blit) |
||||
(ret) |
||||
) |
||||
|
||||
(:loop) |
||||
(sc-poll) |
||||
; did_change -- did the user interact during this frame? |
||||
(ld did_change 0) |
||||
|
||||
(sym pstep r2) |
||||
(sym zstep r3) |
||||
(ld pstep PAN_STEP) |
||||
(ld zstep ZOOM_STEP) |
||||
(sc-key _ KEY_ShiftL (nz? |
||||
; turbo mode |
||||
(fmul pstep 5.0) |
||||
(fmul zstep 5.0) |
||||
)) |
||||
(fadd zstep 1.0) |
||||
|
||||
; scaled movement speed |
||||
(fdiv pstep mb_s) |
||||
|
||||
(tst is_first_render (z? |
||||
; A < |
||||
(sc-key _ KEY_A (nz? |
||||
(fsub mb_x pstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Pan left\n") |
||||
)) |
||||
|
||||
; W ^ |
||||
(sc-key _ KEY_W (nz? |
||||
(fsub mb_y pstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Pan up\n") |
||||
)) |
||||
|
||||
; S v |
||||
(sc-key _ KEY_S (nz? |
||||
(fadd mb_y pstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Pan down\n") |
||||
)) |
||||
|
||||
; D > |
||||
(sc-key _ KEY_D (nz? |
||||
(fadd mb_x pstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Pan right\n") |
||||
)) |
||||
|
||||
; Q + |
||||
(sc-key r0 KEY_Q (nz? |
||||
(fmul mb_s zstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Zoom in\n") |
||||
)) |
||||
|
||||
; E - |
||||
(sc-key r0 KEY_E (nz? |
||||
(fdiv mb_s zstep) |
||||
(ld did_change 1) |
||||
(lds @cout "Zoom out\n") |
||||
)) |
||||
|
||||
; R iter+ |
||||
(sc-key r0 KEY_R (nz? |
||||
(add maxiter 50) |
||||
(lds @cout "ITER=") (call printnum maxiter) (ld @cout '\n') |
||||
(mslp 200) ; Avoid unexpected rapid change |
||||
)) |
||||
|
||||
; F iter- |
||||
(sc-key r0 KEY_F (nz? |
||||
(cmp maxiter 50) |
||||
(sub.gt maxiter 50) |
||||
(lds @cout "ITER=") (call printnum maxiter) (ld @cout '\n') |
||||
(mslp 200) ; Avoid unexpected rapid change |
||||
)) |
||||
|
||||
; G force redraw |
||||
(sc-key r0 KEY_G (nz? |
||||
(ld did_change 1) |
||||
)) |
||||
|
||||
(tst did_change (nz? |
||||
; something changed... |
||||
; mark this as a first render and reset col_skip and row_skip |
||||
(ld is_first_render 1) |
||||
(ld mb_skip_index 0) |
||||
; Start from top |
||||
(ld mb_row 0) |
||||
)) |
||||
)) |
||||
(unsym pstep) |
||||
(unsym zstep) |
||||
|
||||
(sym mb_col_skip r2) |
||||
(sym mb_row_skip r3) |
||||
(bfrd mb_col_skip @mb_skip_table_x mb_skip_index) |
||||
(bfrd mb_row_skip @mb_skip_table_y mb_skip_index) |
||||
(bfrd r1 @mb_size_table mb_skip_index) |
||||
|
||||
; render row mb_row + row skip |
||||
(ld r0 mb_row) |
||||
(add r0 mb_row_skip) |
||||
(call render_row r1 mb_col_skip mb_x mb_y mb_s r0) |
||||
(unsym mb_col_skip) |
||||
(unsym mb_row_skip) |
||||
|
||||
(cmp mb_row H |
||||
(lt? |
||||
; if mb_row < H |
||||
(add mb_row ROW_SKIP) |
||||
) |
||||
(else? |
||||
; otherwise, this frame is done |
||||
(ld mb_row 0) |
||||
(add mb_skip_index 1) |
||||
(ld is_first_render 0) |
||||
|
||||
(cmp mb_skip_index MB_SKIP_TABLE_SIZE (ge? |
||||
; if skip index is out of bounds, go back to repeating area |
||||
(ld mb_skip_index MB_SKIP_REPEAT_INDEX) |
||||
)) |
||||
) |
||||
) |
||||
(j :loop) |
||||
|
||||
(proc pixel xi yi off_x off_y scale |
||||
(sym x0 r7) |
||||
(sym y0 r8) |
||||
(itf x0 xi) |
||||
(itf y0 yi) |
||||
|
||||
; Scale to the interesting range x -2.5..1 and y -1..1 |
||||
(itf r0 W) |
||||
(itf r1 H) |
||||
|
||||
(fdiv x0 r0) |
||||
(fmul x0 3.5) |
||||
(fsub x0 2.5) |
||||
|
||||
(fdiv y0 r1) |
||||
(fmul y0 2.4) |
||||
(fsub y0 1.2) |
||||
|
||||
(fdiv x0 scale) |
||||
(fdiv y0 scale) |
||||
(fadd x0 off_x) |
||||
(fadd y0 off_y) |
||||
|
||||
(sym x r5) |
||||
(sym y r6) |
||||
(ld x 0.0) |
||||
(ld y 0.0) |
||||
(sym iter r4) |
||||
|
||||
(:iter) |
||||
(cmp iter maxiter) |
||||
(j.eq :end) |
||||
(fmul r0 x x) |
||||
(fmul r1 y y) |
||||
(fadd r2 r1) |
||||
(fcmp r2 4.0) |
||||
(j.gt :end) |
||||
|
||||
(fsub r2 r0 r1) |
||||
(fadd r2 x0) |
||||
|
||||
(fmul r0 x y) |
||||
(fmul r0 2.0) |
||||
(fadd r0 y0) |
||||
(ld y r0) |
||||
(ld x r2) |
||||
(inc iter) |
||||
(j :iter) |
||||
|
||||
(:end) |
||||
(ret iter) |
||||
) |
||||
|
||||
(proc printnum num |
||||
(mkbf r15) |
||||
(ld r1 num) |
||||
(tst r1 (<0? (mul r1 -1))) |
||||
(:next) |
||||
(mod r0 r1 10) |
||||
(add r0 '0') |
||||
(bfrpush @r15 r0) |
||||
(div r1 10 (z? |
||||
(tst num (<0? (bfrpush @r15 '-'))) |
||||
(lds @cout @r15) |
||||
(del @r15) |
||||
(ret))) |
||||
(j :next) |
||||
) |
||||
) |
||||
|
@ -1,97 +0,0 @@ |
||||
( |
||||
(def PX_W 1024) |
||||
(def PX_H 768) |
||||
(def UPSCALE 8) |
||||
(def MAXITER 50) |
||||
|
||||
(sc-init PX_W PX_H) |
||||
(sc-opt SCREEN_AUTOBLIT 0) |
||||
(sc-opt SCREEN_UPSCALE UPSCALE) |
||||
(def W (=div PX_W UPSCALE)) |
||||
(def H (=div PX_H UPSCALE)) |
||||
|
||||
(sym gradient r9) |
||||
(sym asciigr r10) |
||||
|
||||
(mkbf gradient ( |
||||
0x421e0f 0x19071a 0x09012f 0x040449 0x000764 0x0c2c8a 0x1852b1 0x397dd1 |
||||
0x86b5e5 0xd3ecf8 0xf1e9bf 0xf8c95f 0xffaa00 0xcc8000 0x995700 0x6a3403)) |
||||
|
||||
(sym x r7) |
||||
(sym y r8) |
||||
(:row) |
||||
(:col) |
||||
(call pixel x y) |
||||
(sub r0 MAXITER 1) |
||||
(rcmp res0 1 r0 |
||||
(eq? |
||||
(mod r0 res0 16) |
||||
(bfrd r0 @gradient r0) |
||||
) |
||||
(else? (ld r0 0)) |
||||
) |
||||
(sc-wr x y r0) |
||||
(inc x) |
||||
(cmp x W) |
||||
(j.ne :col) |
||||
(ld x 0) |
||||
(inc y) |
||||
(sc-blit) ; Render after every row |
||||
(cmp y H) |
||||
(j.ne :row) |
||||
|
||||
;(sc-blit) |
||||
|
||||
(:slp) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
(j :slp) |
||||
|
||||
(proc pixel xi yi |
||||
(sym x0 r7) |
||||
(sym y0 r8) |
||||
(itf x0 xi) |
||||
(itf y0 yi) |
||||
|
||||
; Scale to the interesting range x -2.5..1 and y -1..1 |
||||
(itf r0 W) |
||||
(itf r1 H) |
||||
|
||||
(fdiv x0 r0) |
||||
(fmul x0 3.5) |
||||
(fsub x0 2.5) |
||||
|
||||
(fdiv y0 r1) |
||||
(fmul y0 2.4) |
||||
(fsub y0 1.2) |
||||
|
||||
(sym x r5) |
||||
(sym y r6) |
||||
(ld x 0.0) |
||||
(ld y 0.0) |
||||
(sym iter r4) |
||||
|
||||
(:iter) |
||||
(cmp iter MAXITER) |
||||
(j.eq :end) |
||||
(fmul r0 x x) |
||||
(fmul r1 y y) |
||||
(fadd r2 r1) |
||||
(fcmp r2 4.0) |
||||
(j.gt :end) |
||||
|
||||
(fsub r2 r0 r1) |
||||
(fadd r2 x0) |
||||
|
||||
(fmul r0 x y) |
||||
(fmul r0 2.0) |
||||
(fadd r0 y0) |
||||
(ld y r0) |
||||
(ld x r2) |
||||
(inc iter) |
||||
(j :iter) |
||||
|
||||
(:end) |
||||
(ret iter) |
||||
) |
||||
) |
@ -1,48 +0,0 @@ |
||||
::::::::::::::::::::::::::::::::::::::::+++++++++++++++++++++++++++++++++==============+++++++++++++++++++=::::::::::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::::::+++++++++++++++++++++++++++++++++========%%%%%=@%%%%%++++++++========:::::::::::::::::::: |
||||
::::::::::::::::::::::::::::::::::::::+++++++++++++++++++++++++++++++++=========%%@#.&$#%%%%%%%%=============::::::::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::::===+++++++++++++++++++++++++++++==========%%%%##.-##@@@%%%===============:::::::::::::::::: |
||||
::::::::::::::::::::::::::::::::::::=======+++++++++++++++++++++++++==========%%%%##$&::& ||#@%%===============::::::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::===========+++++++++++++++++++%%%=========@@@@@##$**:.|&$@@@@================:::::::::::::::: |
||||
::::::::::::::::::::::::::::::::::=================++++++++++%%%%%%%%%%%%%@@@@@@@$$&*& ::=&$##@@@%================:::::::::::::: |
||||
::::::::::::::::::::::::::::::::=========================%%%%%%%%%%%%%%%%%@@@@##$:#$.#& :-:$$@@@%%%%%%%%%=========::::::::::::: |
||||
:::::::::::::::::::::::::::::::==========================%%%%%%%%%%%%%%%%@@@@@##$*:= :&###%%%%%%%%%%=========+::::::::::: |
||||
:::::::::::::::::::::::::::::============================%%%%%%%%%@%%%%####@$$$&&|. *.&$####@%@@@@%%=========++:::::::::: |
||||
:::::::::::::::::::::::::::==============================%%%%%%%%@@##$$$:*$$&&**|-:$ -**&&$##@@@#|#%========+++++:::::::: |
||||
:::::::::::::::::::::::::+==============================%%%%%%%%%@@@&|:&,:|*|# , | *..#.*$&$&&: #@@=====++++++++:::::: |
||||
:::::::::::::::::::::::+++============================@@%%%%%%%%@@@$&|:@ =, * + --,%% :,#%%%%%=++++++++++:::: |
||||
:::::::::::::::::::::++++++==============%%%========@@@@@@@%%%#####$$*. @-*#%%%%%%++++++++++++:: |
||||
:::::::::::::::::::++++++++=============%%%%%%%%%@@@@@@@@@@@@###$$&* - : :,*$@@@%%%%++++++++++++++ |
||||
::::::::::::::::++++++++++==============%%%@####@@@@@#@@@@@@####$*=: -&###@%%%%++++++++++++++ |
||||
::::::::::::::++++++++++++=============%%%%@$||&#$$##$$##$$$$##&&&- %-*&:@%%%%++++++++++++++ |
||||
:::::::::::++++++++++++++=============%%%%##&.:**&&$&::**&&$$$&&*% =,#%%%==+++++++++++++ |
||||
::::::::++++++++++++++++%%%%========@@@@@@##&&|. ,.::.+ .,.****|-&* *#@@@====++++++++++++ |
||||
::::::+++++++++++++++++%%%%%%%%%%%@@@@@@@@$$$*|.& @ =::-:. |$@@======+++++++++++ |
||||
:::++++++++++++++++++%%%%%%%%%%%%%@@@@####$$*--.$ , , %-#@@========+++++++++ |
||||
:++++++++++++++++++==%%%%%%%%%%%%@@@@@#*-&**--= %# :$#%%%=========+++++++ |
||||
+++++++++++++++++====%%%%%@@@@#####$$$$&|:. .- , $$@@%%%%==========+++++ |
||||
++++++++++++++======@@@##@$*$$##$#&$$-*|.+ : #$#@@@%%%%%==========+++ |
||||
+++++++++++++====%@ - |*$$#@@@%%%%%=========+++ |
||||
++++++++++++++======@@@##@$*$$##$#&$$-*|.+ : #$#@@@%%%%%==========+++ |
||||
+++++++++++++++++====%%%%%@@@@#####$$$$&|:. .- , $$@@%%%%==========+++++ |
||||
:++++++++++++++++++==%%%%%%%%%%%%@@@@@#*-&**--= %# :$#%%%=========+++++++ |
||||
:::++++++++++++++++++%%%%%%%%%%%%%@@@@####$$*--.$ , , %-#@@========+++++++++ |
||||
::::::+++++++++++++++++%%%%%%%%%%%@@@@@@@@$$$*|.& @ =::-:. |$@@======+++++++++++ |
||||
::::::::++++++++++++++++%%%%========@@@@@@##&&|. ,.::.+ .,.****|-&* *#@@@====++++++++++++ |
||||
:::::::::::++++++++++++++=============%%%%##&.:**&&$&::**&&$$$&&*% =,#%%%==+++++++++++++ |
||||
::::::::::::::++++++++++++=============%%%%@$||&#$$##$$##$$$$##&&&- %-*&:@%%%%++++++++++++++ |
||||
::::::::::::::::++++++++++==============%%%@####@@@@@#@@@@@@####$*=: -&###@%%%%++++++++++++++ |
||||
:::::::::::::::::::++++++++=============%%%%%%%%%@@@@@@@@@@@@###$$&* - : :,*$@@@%%%%++++++++++++++ |
||||
:::::::::::::::::::::++++++==============%%%========@@@@@@@%%%#####$$*. @-*#%%%%%%++++++++++++:: |
||||
:::::::::::::::::::::::+++============================@@%%%%%%%%@@@$&|:@ =, * + --,%% :,#%%%%%=++++++++++:::: |
||||
:::::::::::::::::::::::::+==============================%%%%%%%%%@@@&|:&,:|*|# , | *..#.*$&$&&: #@@=====++++++++:::::: |
||||
:::::::::::::::::::::::::::==============================%%%%%%%%@@##$$$:*$$&&**|-:$ -**&&$##@@@#|#%========+++++:::::::: |
||||
:::::::::::::::::::::::::::::============================%%%%%%%%%@%%%%####@$$$&&|. *.&$####@%@@@@%%=========++:::::::::: |
||||
:::::::::::::::::::::::::::::::==========================%%%%%%%%%%%%%%%%@@@@@##$*:= :&###%%%%%%%%%%=========+::::::::::: |
||||
::::::::::::::::::::::::::::::::=========================%%%%%%%%%%%%%%%%%@@@@##$:#$.#& :-:$$@@@%%%%%%%%%=========::::::::::::: |
||||
::::::::::::::::::::::::::::::::::=================++++++++++%%%%%%%%%%%%%@@@@@@@$$&*& ::=&$##@@@%================:::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::===========+++++++++++++++++++%%%=========@@@@@##$**:.|&$@@@@================:::::::::::::::: |
||||
::::::::::::::::::::::::::::::::::::=======+++++++++++++++++++++++++==========%%%%##$&::& ||#@%%===============::::::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::::===+++++++++++++++++++++++++++++==========%%%%##.-##@@@%%%===============:::::::::::::::::: |
||||
::::::::::::::::::::::::::::::::::::::+++++++++++++++++++++++++++++++++=========%%@#.&$#%%%%%%%%=============::::::::::::::::::: |
||||
:::::::::::::::::::::::::::::::::::::::+++++++++++++++++++++++++++++++++========%%%%%=@%%%%%++++++++========:::::::::::::::::::: |
Before Width: | Height: | Size: 104 KiB |
@ -1,353 +0,0 @@ |
||||
( |
||||
; This is a demo of a bitmap font and string rendering using buffers. |
||||
; You can do this many ways. |
||||
|
||||
(sc-init 800 250) |
||||
(sc-opt SCREEN_UPSCALE 5) |
||||
|
||||
; Define a font. This should be less ugly once we have includes implemented... |
||||
(sym FONT g15) |
||||
(mkbf FONT ( |
||||
0x0000000000000000 ; 0 |
||||
0x7e81a581bd99817e ; 1 |
||||
0x7effdbffc3e7ff7e ; 2 |
||||
0x367f7f7f3e1c0800 ; 3 |
||||
0x081c3e7f3e1c0800 ; 4 |
||||
0x1c3e1c7f7f3e1c3e ; 5 |
||||
0x08081c3e7f3e1c3e ; 6 |
||||
0x0000183c3c180000 ; 7 |
||||
0xffffe7c3c3e7ffff ; 8 |
||||
0x003c664242663c00 ; 9 |
||||
0xffc399bdbd99c3ff ; 10 |
||||
0xf0e0f0be3333331e ; 11 |
||||
0x3c6666663c187e18 ; 12 |
||||
0xfcccfc0c0c0e0f07 ; 13 |
||||
0xfec6fec6c6e66703 ; 14 |
||||
0x995a3ce7e73c5a99 ; 15 |
||||
0x01071f7f1f070100 ; 16 |
||||
0x40707c7f7c704000 ; 17 |
||||
0x183c7e18187e3c18 ; 18 |
||||
0x6666666666006600 ; 19 |
||||
0xfedbdbded8d8d800 ; 20 |
||||
0x7cc61c36361c331e ; 21 |
||||
0x000000007e7e7e00 ; 22 |
||||
0x183c7e187e3c18ff ; 23 |
||||
0x183c7e1818181800 ; 24 |
||||
0x181818187e3c1800 ; 25 |
||||
0x0018307f30180000 ; 26 |
||||
0x000c067f060c0000 ; 27 |
||||
0x00000303037f0000 ; 28 |
||||
0x002466ff66240000 ; 29 |
||||
0x00183c7effff0000 ; 30 |
||||
0x00ffff7e3c180000 ; 31 |
||||
0x0000000000000000 ; 32 ' ' |
||||
0x0c1e1e0c0c000c00 ; 33 '!' |
||||
0x3636360000000000 ; 34 '"' |
||||
0x36367f367f363600 ; 35 '#' |
||||
0x0c3e031e301f0c00 ; 36 '$' |
||||
0x006333180c666300 ; 37 '%' |
||||
0x1c361c6e3b336e00 ; 38 '&' |
||||
0x0606030000000000 ; 39 ''' |
||||
0x180c0606060c1800 ; 40 '(' |
||||
0x060c1818180c0600 ; 41 ')' |
||||
0x00663cff3c660000 ; 42 '*' |
||||
0x000c0c3f0c0c0000 ; 43 '+' |
||||
0x00000000000c0c06 ; 44 ',' |
||||
0x0000003f00000000 ; 45 '-' |
||||
0x00000000000c0c00 ; 46 '.' |
||||
0x6030180c06030100 ; 47 '/' |
||||
0x3e63737b6f673e00 ; 48 '0' |
||||
0x0c0e0c0c0c0c3f00 ; 49 '1' |
||||
0x1e33301c06333f00 ; 50 '2' |
||||
0x1e33301c30331e00 ; 51 '3' |
||||
0x383c36337f307800 ; 52 '4' |
||||
0x3f031f3030331e00 ; 53 '5' |
||||
0x1c06031f33331e00 ; 54 '6' |
||||
0x3f3330180c0c0c00 ; 55 '7' |
||||
0x1e33331e33331e00 ; 56 '8' |
||||
0x1e33333e30180e00 ; 57 '9' |
||||
0x000c0c00000c0c00 ; 58 ':' |
||||
0x000c0c00000c0c06 ; 59 ';' |
||||
0x180c0603060c1800 ; 60 '<' |
||||
0x00003f00003f0000 ; 61 '=' |
||||
0x060c1830180c0600 ; 62 '>' |
||||
0x1e3330180c000c00 ; 63 '?' |
||||
0x3e637b7b7b031e00 ; 64 '@' |
||||
0x0c1e33333f333300 ; 65 'A' |
||||
0x3f66663e66663f00 ; 66 'B' |
||||
0x3c66030303663c00 ; 67 'C' |
||||
0x1f36666666361f00 ; 68 'D' |
||||
0x7f46161e16467f00 ; 69 'E' |
||||
0x7f46161e16060f00 ; 70 'F' |
||||
0x3c66030373667c00 ; 71 'G' |
||||
0x3333333f33333300 ; 72 'H' |
||||
0x1e0c0c0c0c0c1e00 ; 73 'I' |
||||
0x7830303033331e00 ; 74 'J' |
||||
0x6766361e36666700 ; 75 'K' |
||||
0x0f06060646667f00 ; 76 'L' |
||||
0x63777f7f6b636300 ; 77 'M' |
||||
0x63676f7b73636300 ; 78 'N' |
||||
0x1c36636363361c00 ; 79 'O' |
||||
0x3f66663e06060f00 ; 80 'P' |
||||
0x1e3333333b1e3800 ; 81 'Q' |
||||
0x3f66663e36666700 ; 82 'R' |
||||
0x1e33070e38331e00 ; 83 'S' |
||||
0x3f2d0c0c0c0c1e00 ; 84 'T' |
||||
0x3333333333333f00 ; 85 'U' |
||||
0x33333333331e0c00 ; 86 'V' |
||||
0x6363636b7f776300 ; 87 'W' |
||||
0x6363361c1c366300 ; 88 'X' |
||||
0x3333331e0c0c1e00 ; 89 'Y' |
||||
0x7f6331184c667f00 ; 90 'Z' |
||||
0x1e06060606061e00 ; 91 '[' |
||||
0x03060c1830604000 ; 92 '\' |
||||
0x1e18181818181e00 ; 93 ']' |
||||
0x081c366300000000 ; 94 '^' |
||||
0x00000000000000ff ; 95 '_' |
||||
0x0c0c180000000000 ; 96 '`' |
||||
0x00001e303e336e00 ; 97 'a' |
||||
0x0706063e66663b00 ; 98 'b' |
||||
0x00001e3303331e00 ; 99 'c' |
||||
0x3830303e33336e00 ; 100 'd' |
||||
0x00001e333f031e00 ; 101 'e' |
||||
0x1c36060f06060f00 ; 102 'f' |
||||
0x00006e33333e301f ; 103 'g' |
||||
0x0706366e66666700 ; 104 'h' |
||||
0x0c000e0c0c0c1e00 ; 105 'i' |
||||
0x300030303033331e ; 106 'j' |
||||
0x070666361e366700 ; 107 'k' |
||||
0x0e0c0c0c0c0c1e00 ; 108 'l' |
||||
0x0000337f7f6b6300 ; 109 'm' |
||||
0x00001f3333333300 ; 110 'n' |
||||
0x00001e3333331e00 ; 111 'o' |
||||
0x00003b66663e060f ; 112 'p' |
||||
0x00006e33333e3078 ; 113 'q' |
||||
0x00003b6e66060f00 ; 114 'r' |
||||
0x00003e031e301f00 ; 115 's' |
||||
0x080c3e0c0c2c1800 ; 116 't' |
||||
0x0000333333336e00 ; 117 'u' |
||||
0x00003333331e0c00 ; 118 'v' |
||||
0x0000636b7f7f3600 ; 119 'w' |
||||
0x000063361c366300 ; 120 'x' |
||||
0x00003333333e301f ; 121 'y' |
||||
0x00003f190c263f00 ; 122 'z' |
||||
0x380c0c070c0c3800 ; 123 '{' |
||||
0x1818180018181800 ; 124 '|' |
||||
0x070c0c380c0c0700 ; 125 '}' |
||||
0x6e3b000000000000 ; 126 '~' |
||||
0x00081c3663637f00 ; 127 |
||||
0x1e3303331e18301e ; 128 |
||||
0x0033003333337e00 ; 129 |
||||
0x38001e333f031e00 ; 130 |
||||
0x7ec33c607c66fc00 ; 131 |
||||
0x33001e303e337e00 ; 132 |
||||
0x07001e303e337e00 ; 133 |
||||
0x0c0c1e303e337e00 ; 134 |
||||
0x00001e03031e301c ; 135 |
||||
0x7ec33c667e063c00 ; 136 |
||||
0x33001e333f031e00 ; 137 |
||||
0x07001e333f031e00 ; 138 |
||||
0x33000e0c0c0c1e00 ; 139 |
||||
0x3e631c1818183c00 ; 140 |
||||
0x07000e0c0c0c1e00 ; 141 |
||||
0x631c36637f636300 ; 142 |
||||
0x0c0c001e333f3300 ; 143 |
||||
0x38003f061e063f00 ; 144 |
||||
0x0000fe30fe33fe00 ; 145 |
||||
0x7c36337f33337300 ; 146 |
||||
0x1e33001e33331e00 ; 147 |
||||
0x0033001e33331e00 ; 148 |
||||
0x0007001e33331e00 ; 149 |
||||
0x1e33003333337e00 ; 150 |
||||
0x0007003333337e00 ; 151 |
||||
0x00330033333e301f ; 152 |
||||
0xc3183c66663c1800 ; 153 |
||||
0x3300333333331e00 ; 154 |
||||
0x18187e03037e1818 ; 155 |
||||
0x1c36260f06673f00 ; 156 |
||||
0x33331e3f0c3f0c0c ; 157 |
||||
0x1f33335f63f363e3 ; 158 |
||||
0x70d8183c18181b0e ; 159 |
||||
0x38001e303e337e00 ; 160 |
||||
0x1c000e0c0c0c1e00 ; 161 |
||||
0x0038001e33331e00 ; 162 |
||||
0x0038003333337e00 ; 163 |
||||
0x001f001f33333300 ; 164 |
||||
0x3f0033373f3b3300 ; 165 |
||||
0x3c36367c007e0000 ; 166 |
||||
0x1c36361c003e0000 ; 167 |
||||
0x0c000c0603331e00 ; 168 |
||||
0x0000003f03030000 ; 169 |
||||
0x0000003f30300000 ; 170 |
||||
0xc363337bcc6633f0 ; 171 |
||||
0xc36333dbecf6f3c0 ; 172 |
||||
0x1818001818181800 ; 173 |
||||
0x00cc663366cc0000 ; 174 |
||||
0x003366cc66330000 ; 175 |
||||
0x4411441144114411 ; 176 |
||||
0xaa55aa55aa55aa55 ; 177 |
||||
0xdbeedb77dbeedb77 ; 178 |
||||
0x1818181818181818 ; 179 |
||||
0x181818181f181818 ; 180 |
||||
0x18181f181f181818 ; 181 |
||||
0x6c6c6c6c6f6c6c6c ; 182 |
||||
0x000000007f6c6c6c ; 183 |
||||
0x00001f181f181818 ; 184 |
||||
0x6c6c6f606f6c6c6c ; 185 |
||||
0x6c6c6c6c6c6c6c6c ; 186 |
||||
0x00007f606f6c6c6c ; 187 |
||||
0x6c6c6f607f000000 ; 188 |
||||
0x6c6c6c6c7f000000 ; 189 |
||||
0x18181f181f000000 ; 190 |
||||
0x000000001f181818 ; 191 |
||||
0x18181818f8000000 ; 192 |
||||
0x18181818ff000000 ; 193 |
||||
0x00000000ff181818 ; 194 |
||||
0x18181818f8181818 ; 195 |
||||
0x00000000ff000000 ; 196 |
||||
0x18181818ff181818 ; 197 |
||||
0x1818f818f8181818 ; 198 |
||||
0x6c6c6c6cec6c6c6c ; 199 |
||||
0x6c6cec0cfc000000 ; 200 |
||||
0x0000fc0cec6c6c6c ; 201 |
||||
0x6c6cef00ff000000 ; 202 |
||||
0x0000ff00ef6c6c6c ; 203 |
||||
0x6c6cec0cec6c6c6c ; 204 |
||||
0x0000ff00ff000000 ; 205 |
||||
0x6c6cef00ef6c6c6c ; 206 |
||||
0x1818ff00ff000000 ; 207 |
||||
0x6c6c6c6cff000000 ; 208 |
||||
0x0000ff00ff181818 ; 209 |
||||
0x00000000ff6c6c6c ; 210 |
||||
0x6c6c6c6cfc000000 ; 211 |
||||
0x1818f818f8000000 ; 212 |
||||
0x0000f818f8181818 ; 213 |
||||
0x00000000fc6c6c6c ; 214 |
||||
0x6c6c6c6cff6c6c6c ; 215 |
||||
0x1818ff18ff181818 ; 216 |
||||
0x181818181f000000 ; 217 |
||||
0x00000000f8181818 ; 218 |
||||
0xffffffffffffffff ; 219 |
||||
0x00000000ffffffff ; 220 |
||||
0x0f0f0f0f0f0f0f0f ; 221 |
||||
0xf0f0f0f0f0f0f0f0 ; 222 |
||||
0xffffffff00000000 ; 223 |
||||
0x00006e3b133b6e00 ; 224 |
||||
0x001e331f331f0303 ; 225 |
||||
0x003f330303030300 ; 226 |
||||
0x007f363636363600 ; 227 |
||||
0x3f33060c06333f00 ; 228 |
||||
0x00007e1b1b1b0e00 ; 229 |
||||
0x00666666663e0603 ; 230 |
||||
0x006e3b1818181800 ; 231 |
||||
0x3f0c1e33331e0c3f ; 232 |
||||
0x1c36637f63361c00 ; 233 |
||||
0x1c36636336367700 ; 234 |
||||
0x380c183e33331e00 ; 235 |
||||
0x00007edbdb7e0000 ; 236 |
||||
0x60307edbdb7e0603 ; 237 |
||||
0x1c06031f03061c00 ; 238 |
||||
0x1e33333333333300 ; 239 |
||||
0x003f003f003f0000 ; 240 |
||||
0x0c0c3f0c0c003f00 ; 241 |
||||
0x060c180c06003f00 ; 242 |
||||
0x180c060c18003f00 ; 243 |
||||
0x70d8d81818181818 ; 244 |
||||
0x18181818181b1b0e ; 245 |
||||
0x0c0c003f000c0c00 ; 246 |
||||
0x006e3b006e3b0000 ; 247 |
||||
0x1c36361c00000000 ; 248 |
||||
0x0000001818000000 ; 249 |
||||
0x0000000018000000 ; 250 |
||||
0xf030303037363c38 ; 251 |
||||
0x1e36363636000000 ; 252 |
||||
0x0e180c061e000000 ; 253 |
||||
0x00003c3c3c3c0000 ; 254 |
||||
0x0000000000000000 ; 255 |
||||
)) |
||||
|
||||
(mkbf r7 " Hello World ") |
||||
(bfpush @r7 1) ; ASCII smileys |
||||
(bfrpush @r7 2) |
||||
|
||||
; It sometimes randomly doesn't show... ??? |
||||
|
||||
; Test |
||||
(sc-wr 0 0 #ff00ff) |
||||
(sc-blit) |
||||
|
||||
(call ShowChar 10 10 #ffffff 'A') |
||||
|
||||
(call ShowString 10 20 #ffff00 r7) |
||||
(sc-blit) |
||||
|
||||
(bfrsz @r7 0) |
||||
|
||||
(lds @cout "Type something: ") |
||||
(:read) |
||||
(ld r0 @cin (eof? (halt))) |
||||
(ld @cout r0) |
||||
(ld @r7 r0) |
||||
(call ShowString 10 30 #ff0000 r7) |
||||
(sc-blit) |
||||
(j :read) |
||||
|
||||
(proc ShowString x y color str |
||||
(sym size r10) |
||||
(sym index r11) |
||||
(sym xx r12) |
||||
|
||||
(bfsz size @str (z? (ret))) |
||||
(ld index 0) |
||||
(ld xx x) |
||||
(:ch) |
||||
(bfrd r0 @str index) |
||||
(call ShowChar xx y color r0) |
||||
(add xx 8) |
||||
(inc index) |
||||
(dec size (z? (ret))) |
||||
(j :ch) |
||||
) |
||||
|
||||
(proc ShowChar x y color ch |
||||
(rcmp ch 0 255) |
||||
(ret.ne) |
||||
|
||||
(sym s r15) |
||||
(bfrd s @FONT ch) |
||||
(rev s) |
||||
|
||||
(sym xx r5) |
||||
(sym yy r6) |
||||
(sym nb r7) |
||||
(sym xmax r8) |
||||
(add xmax x 8) |
||||
|
||||
(ld xx x) |
||||
(ld yy y) |
||||
(ld nb 64) |
||||
|
||||
(:nb) |
||||
(and r0 s 1) |
||||
(j.z :skip) |
||||
|
||||
(sc-wr xx yy color) |
||||
|
||||
(:skip) |
||||
(ror s 1) |
||||
(inc xx) |
||||
(cmp xx xmax (eq? (ld xx x)(inc yy))) |
||||
(dec nb) |
||||
(j.nz :nb) |
||||
(ret) |
||||
) |
||||
|
||||
|
||||
(proc WaitForClose |
||||
(:j) |
||||
(sc-blit) |
||||
;(sc-poll) |
||||
(mslp 100) |
||||
(j :j) |
||||
) |
||||
) |
@ -1,58 +0,0 @@ |
||||
( |
||||
; Helper to check key codes of physical keys |
||||
|
||||
(sc-init 200 200) |
||||
(lds @cout "Press keys in the window to see their codes...\n") |
||||
(sym pressed r15) |
||||
(mkbf pressed 256) |
||||
(:loop) |
||||
(sc-poll) |
||||
(mslp 10) |
||||
(sym cnt r14) |
||||
(ld cnt 0) |
||||
(:next) |
||||
(sc-key _ cnt |
||||
(inval? (nop)) |
||||
(nz? |
||||
(bfrd r1 @pressed cnt |
||||
(z? |
||||
(call printnum cnt) |
||||
(lds @cout " PRESS\n") |
||||
(bfwr @pressed cnt 1) |
||||
(rng r0 0 #ffffff) |
||||
(sc-erase r0) |
||||
(sc-blit) |
||||
) |
||||
) |
||||
) |
||||
(z? |
||||
(bfrd r1 @pressed cnt |
||||
(nz? |
||||
(call printnum cnt) |
||||
(lds @cout " RELEASE\n") |
||||
(bfwr @pressed cnt 0) |
||||
) |
||||
) |
||||
) |
||||
) |
||||
(inc cnt) |
||||
(cmp cnt 256 (ne? (j :next))) |
||||
(j :loop) |
||||
|
||||
; this is a version if itoa that prints a number |
||||
(proc printnum num |
||||
(mkbf r15) |
||||
(ld r1 num) |
||||
(tst r1 (<0? (mul r1 -1))) |
||||
(:next) |
||||
(mod r0 r1 10) |
||||
(add r0 '0') |
||||
(bfrpush @r15 r0) |
||||
(div r1 10 (z? |
||||
(tst num (<0? (bfrpush @r15 '-'))) |
||||
(lds @cout @r15) |
||||
(del @r15) |
||||
(ret))) |
||||
(j :next) |
||||
) |
||||
) |
@ -1,28 +0,0 @@ |
||||
( |
||||
(sc-init 512 512) |
||||
(sc-opt SCREEN_UPSCALE 16) |
||||
(def W 32) |
||||
|
||||
(lds @cout "Drag colors to draw...\n") |
||||
|
||||
(sc-wr 0 0 #ff00ff) |
||||
(sc-wr 5 5 #ffff00) |
||||
(sc-wr 15 15 #00ff00) |
||||
(sc-blit) |
||||
|
||||
(:l) |
||||
(sc-poll) |
||||
(sc-mbtn r0 0) |
||||
(j.z :nope) |
||||
|
||||
(sc-mouse r0 r1) |
||||
(sc-rd r3 r0 r1) |
||||
(sub r0 1) |
||||
(sub r1 1) |
||||
(sc-rect r0 r1 3 3 r3) |
||||
(sc-blit) |
||||
|
||||
(:nope) |
||||
(mslp 10) |
||||
(j :l) |
||||
) |
@ -1,14 +0,0 @@ |
||||
( |
||||
(sc-init 512 512) |
||||
(sc-opt SCREEN_UPSCALE 32) |
||||
|
||||
(sc-wr 0 0 #ff00ff) |
||||
(sc-wr 1 1 #ffff00) |
||||
(sc-wr 15 15 #00ff00) |
||||
(sc-blit) |
||||
|
||||
(:l) |
||||
(sc-poll) |
||||
(mslp 100) |
||||
(j :l) |
||||
) |
@ -1,15 +0,0 @@ |
||||
( |
||||
(sc-init 512 512) |
||||
(sc-opt SCREEN_UPSCALE 16) |
||||
(def W 32) |
||||
|
||||
(:l) |
||||
(sc-poll) |
||||
(sc-erase) |
||||
(sc-mouse r0 r1) |
||||
(sc-rect 0 r1 W 1 #ff0000) |
||||
(sc-rect r0 0 1 W #0066ff) |
||||
(sc-wr r0 r1 #ffffff) |
||||
(mslp 10) |
||||
(j :l) |
||||
) |
@ -1,36 +0,0 @@ |
||||
( |
||||
; test else |
||||
|
||||
(cmp 0 5 |
||||
(eq? (fault)) |
||||
(else? (ld r0 15)) |
||||
(lt? (fault)) ; This should produce a warning |
||||
) |
||||
(cmp 15 r0 |
||||
(ne? (fault "else did not run"))) |
||||
|
||||
(ld r0 0) |
||||
|
||||
(cmp 0 5 |
||||
(lt? (nop)) |
||||
(else? (fault "fallthrough to else")) |
||||
) |
||||
|
||||
; |
||||
|
||||
(ld r8 0) |
||||
|
||||
(ld r0 1 |
||||
(else? (add r8 1)) |
||||
) |
||||
|
||||
(sub r0 1 |
||||
(pos? (fault)) |
||||
(else? (add r8 1)) |
||||
) |
||||
|
||||
|
||||
(cmp r8 2 |
||||
(ne? (fault)) |
||||
) |
||||
) |
Loading…
Reference in new issue