Skip to content

Instantly share code, notes, and snippets.

@tomaes
Last active May 7, 2020 16:03
Show Gist options
  • Save tomaes/301ab3ed8696d50c1454c8d2a83eb751 to your computer and use it in GitHub Desktop.
Save tomaes/301ab3ed8696d50c1454c8d2a83eb751 to your computer and use it in GitHub Desktop.
40x25 1bpp RLE test (/w wholesome pic)
program one_bpp_txt_rle; { 2020-05-05/07 omi edition }
var s,p: string; i,j: word; q: byte;
begin
s := #52#18#21#20#19#22#17#4#2#3#2#3#2#3#2#3#16#3#18#3#16#3#1#3#9#3#2;
s := s + #3#16#3#1#1#2#1#3#1#4#1#2#1#1#3#16#3#8#1#9#3#16#3#2#1#5#1#5#1#3;
s := s + #3#16#3#2#1#5#1#5#1#3#3#16#3#8#2#8#3#15#4#18#3#15#4#12#1#5#4#14#3;
s := s + #5#1#1#6#7#3#16#1#20#1#19#1#7#4#7#1#20#1#18#1#21#1#16#1#23#16#23;
s := s + #1#2#1#10#1#2#1#20#2#4#1#2#1#2#1#2#1#4#2#17#1#7#2#1#2#1#2#7#1;
s := s + #15#1#24#1#14#1#24#1#6;
p := #219'.';
q := 0; {full first}
asm {40x25 mode}
mov ax, 4
int 10h
end;
for j := 1 to length(s) do
begin
for i := 1 to ord(s[j]) do write(p[q+1]);
q := q xor 1;
end;
asm int 16h end; {repeat until keypressed}
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment