M8trix 8b

From SizeCoding
Revision as of 11:42, 20 August 2016 by Trixter (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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)