Difference between revisions of "M8trix 8b"
From SizeCoding
(Created page with "{{Tinyprog|m8trix 8b|Hellmood|8|http://www.pouet.net/prod.php?which=63126}}") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{Tinyprog|m8trix 8b|Hellmood|8|http://www.pouet.net/prod.php?which=63126}} | + | [[Category:Case Study]] |
+ | {{Tinyprog|title=m8trix 8b|author=Hellmood|bsize=8|link=http://www.pouet.net/prod.php?which=63126}} | ||
+ | Actually, it has been optimized to 7 bytes (!), but let's start with the original. m8trix 8b started out as these 8 bytes: | ||
+ | |||
+ | <syntaxhighlight lang="nasm"> | ||
+ | org 100h | ||
+ | |||
+ | S: | ||
+ | les bx,[si] ; sets ES to the screen, assume si = 0x100 | ||
+ | ; 0x101 is SBB AL,9F and changes the char | ||
+ | ; without CR flag, there would be | ||
+ | ; no animation ;) | ||
+ | lahf ; gets 0x02 (green) in the first run | ||
+ | ; afterwards, it is not called again | ||
+ | ; because of alignment ;) | ||
+ | stosw ; print the green char ... | ||
+ | ; (is also 0xAB9F and works as segment) | ||
+ | inc di ; and skip one row | ||
+ | inc di ; | ||
+ | jmp short S+1 ; repeat on 0x101 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | (This case study is unfinished) |
Latest revision as of 10:42, 20 August 2016
m8trix 8b was created by Hellmood and is 8 bytes in size. Actually, it has been optimized to 7 bytes (!), but let's start with the original. m8trix 8b started out as these 8 bytes:
org 100h
S:
les bx,[si] ; sets ES to the screen, assume si = 0x100
; 0x101 is SBB AL,9F and changes the char
; without CR flag, there would be
; no animation ;)
lahf ; gets 0x02 (green) in the first run
; afterwards, it is not called again
; because of alignment ;)
stosw ; print the green char ...
; (is also 0xAB9F and works as segment)
inc di ; and skip one row
inc di ;
jmp short S+1 ; repeat on 0x101
(This case study is unfinished)