Difference between revisions of "M8trix 8b"

From SizeCoding
Jump to: navigation, search
Line 1: Line 1:
 
{{Tinyprog|title=m8trix 8b|author=Hellmood|bsize=8|link=http://www.pouet.net/prod.php?which=63126}}
 
{{Tinyprog|title=m8trix 8b|author=Hellmood|bsize=8|link=http://www.pouet.net/prod.php?which=63126}}
 +
 +
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>

Revision as of 21:45, 5 August 2016

m8trix 8b was created by Hellmood and is 8 bytes in size.

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