Created
April 5, 2014 21:49
-
-
Save Trinitek/9998525 to your computer and use it in GitHub Desktop.
Monochrome MikeOS splash screen using 13h mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; MikeOS Cat Splashscreen | |
; Uses VGA 320x200, 256 color, mode 13h | |
; Picture data is compressed into one bit per pixel | |
; | |
; Blake Burgess // 5 APR 2014 | |
; | |
width equ 56 ; picture width | |
height equ 61 ; picture height | |
org 0x100 ; MS-DOS COM program for ease of testing | |
main: | |
mov ax, 0x13 ; 320x200, 256 colors | |
int 0x10 | |
drawCat: | |
push 0xA000 | |
pop es | |
xor di, di | |
mov cx, 320*200 ; make screen white | |
mov al, 0xF | |
rep stosb | |
mov si, cat | |
mov di, 320*(100-height/2)+(160-width/2) | |
mov cx, height ; number of lines | |
.nextLine: | |
push cx | |
mov cl, 7 ; number of bytes per line | |
.nextByte: | |
push cx | |
mov al, byte [si] ; grab next byte | |
inc si | |
mov cl, 8 ; number of bits per byte | |
.extractNextBit: | |
shl al, 1 ; extract leftmost bit | |
jc .putBlack ; if one, draw black pixel | |
inc di ; else, skip that pixel | |
jmp .extractNextBit.end | |
.putBlack: | |
mov [es:di], byte 0 | |
inc di | |
.extractNextBit.end: | |
loop .extractNextBit | |
pop cx | |
loop .nextByte | |
add di, 320-width | |
pop cx | |
loop .nextLine | |
waitForKey: | |
mov ah, 0x10 ; wait for a keypress | |
int 0x16 | |
cmp ax, 0 | |
jz waitForKey | |
exit: | |
mov ax, 0x4C00 ; exit to MS-DOS | |
int 0x21 | |
cat: | |
.l1 db 00000000b, 00000000b, 00000000b, 00000000b, 01100000b, 00000000b, 00000000b | |
.l2 db 00000000b, 00000000b, 00000000b, 00000000b, 10010000b, 00000000b, 00000000b | |
.l3 db 00000000b, 00000110b, 00000000b, 00000000b, 10010000b, 00000000b, 00000000b | |
.l4 db 00000000b, 00000101b, 00000000b, 00000001b, 00101000b, 00000000b, 00000000b | |
.l5 db 00000000b, 00001000b, 10000000b, 00000001b, 01001000b, 00000000b, 00000000b | |
.l6 db 00000000b, 00001010b, 10000000b, 00000010b, 10100100b, 00000000b, 00000000b | |
.l7 db 00000000b, 00010101b, 01000000b, 10000010b, 01010100b, 00000000b, 00000000b | |
.l8 db 00000000b, 00010010b, 01000101b, 01000100b, 10101010b, 00000000b, 00000000b | |
.l9 db 00000000b, 00100101b, 00101010b, 10111001b, 01010010b, 00000000b, 00000000b | |
.l10 db 00000000b, 00101010b, 10110100b, 01010000b, 10101010b, 00000000b, 00000000b | |
.l11 db 00000000b, 00100101b, 01000000b, 00101001b, 01010010b, 00000000b, 00000000b | |
.l12 db 00000000b, 00101010b, 10000000b, 00000100b, 00000010b, 00000000b, 00000000b | |
.l13 db 00000000b, 00100100b, 00000000b, 00000000b, 00000010b, 00000000b, 00000000b | |
.l14 db 00000000b, 01010000b, 00000000b, 00000000b, 00000010b, 00000000b, 00000000b | |
.l15 db 00000000b, 01100000b, 00000000b, 00000000b, 00000001b, 00000000b, 00000000b | |
.l16 db 00000000b, 01010000b, 00000000b, 00000000b, 00000001b, 00000000b, 00000000b | |
.l17 db 00000000b, 01100000b, 00000000b, 00000011b, 00000001b, 00000000b, 00000000b | |
.l18 db 00000000b, 01010000b, 00000000b, 00000011b, 10000001b, 00000000b, 00000000b | |
.l19 db 00000000b, 01100000b, 00110000b, 00000011b, 10000001b, 00000000b, 00000000b | |
.l20 db 00000000b, 01010000b, 00111000b, 00000001b, 10000001b, 11111100b, 00000000b | |
.l21 db 00000000b, 01100000b, 00111000b, 00000000b, 00011111b, 00000011b, 11110100b | |
.l22 db 00000000b, 01010000b, 00011000b, 00000000b, 00000001b, 00000000b, 00001010b | |
.l23 db 00000000b, 01100111b, 11000000b, 00000000b, 00000001b, 00000000b, 00000000b | |
.l24 db 00000000b, 11111000b, 00000000b, 00100100b, 00011101b, 00000000b, 00000000b | |
.l25 db 01011111b, 00100000b, 00000001b, 00100100b, 00000011b, 11100000b, 00000000b | |
.l26 db 10100000b, 00110000b, 11100000b, 11011000b, 00000001b, 00011100b, 00000000b | |
.l27 db 00000000b, 00101111b, 00000000b, 00000000b, 00000001b, 00000010b, 10000000b | |
.l28 db 00000000b, 00111000b, 00000000b, 00000000b, 00000010b, 00000001b, 00000000b | |
.l29 db 00000000b, 11001010b, 00000000b, 00000000b, 00001100b, 00000000b, 00000000b | |
.l30 db 00000001b, 00000111b, 00000000b, 00000000b, 00110000b, 00000000b, 00000000b | |
.l31 db 00000010b, 00000000b, 11110000b, 00000000b, 01000000b, 00000000b, 00000000b | |
.l32 db 00010100b, 00000000b, 00100000b, 10001000b, 01001000b, 00000000b, 00000000b | |
.l33 db 00001000b, 00000000b, 01000000b, 00100010b, 01011100b, 00000000b, 00000000b | |
.l34 db 00000000b, 00000000b, 10100000b, 00000000b, 00101111b, 00000000b, 00000000b | |
.l35 db 00000000b, 00000001b, 01000000b, 00000000b, 00100111b, 10000000b, 00000000b | |
.l36 db 00000000b, 00000010b, 10000000b, 00000000b, 00100111b, 11000000b, 00000000b | |
.l37 db 00000000b, 00000101b, 00000000b, 00000000b, 00100011b, 10000000b, 00000000b | |
.l38 db 00000000b, 00001010b, 00000000b, 00000000b, 00100001b, 00000000b, 00000000b | |
.l39 db 00000000b, 00001100b, 01000000b, 00000000b, 00010000b, 00000000b, 11100000b | |
.l40 db 00000000b, 00011000b, 10100000b, 00000000b, 00010000b, 00000001b, 00010000b | |
.l41 db 00000000b, 00010101b, 01000000b, 00000000b, 00010000b, 00000010b, 00010000b | |
.l42 db 00000000b, 00011000b, 10100000b, 00000000b, 00010000b, 00000100b, 00101000b | |
.l43 db 00000000b, 00010101b, 01000000b, 00000000b, 00010000b, 00000100b, 01001000b | |
.l44 db 00000000b, 00011000b, 10100000b, 00000000b, 00001000b, 00000100b, 00101000b | |
.l45 db 00000000b, 00110101b, 01000000b, 00000000b, 00001000b, 00000100b, 01010100b | |
.l46 db 00000000b, 00101000b, 10000000b, 00000000b, 00001000b, 00000010b, 00101100b | |
.l47 db 00000000b, 00110101b, 00000000b, 00000000b, 00001000b, 00000010b, 00010100b | |
.l48 db 00000000b, 00101000b, 10000000b, 00000000b, 00001000b, 00000010b, 00101100b | |
.l49 db 00000000b, 00110101b, 00000000b, 00000000b, 00010000b, 00000010b, 00010100b | |
.l50 db 00000000b, 00101000b, 00000000b, 00000000b, 00010000b, 00000010b, 00101000b | |
.l51 db 00000000b, 00110100b, 00000000b, 00000000b, 00010000b, 00000100b, 00011000b | |
.l52 db 00000000b, 00101000b, 00000000b, 00000000b, 00100000b, 00001000b, 00101000b | |
.l53 db 00000000b, 00110100b, 00000000b, 00000000b, 01000000b, 00010000b, 01011000b | |
.l54 db 00000000b, 00011010b, 00000000b, 00000000b, 10000000b, 01100000b, 00110000b | |
.l55 db 00000000b, 00010100b, 00000000b, 00000000b, 01111111b, 10000000b, 01010000b | |
.l56 db 00000000b, 00011010b, 00000000b, 00000000b, 00000000b, 00000000b, 10100000b | |
.l57 db 00000000b, 00001101b, 00000000b, 00000000b, 00000000b, 00000001b, 01000000b | |
.l58 db 00000000b, 00001010b, 10101000b, 00000000b, 00000000b, 00001011b, 10000000b | |
.l59 db 00000000b, 00000111b, 01010101b, 01000000b, 00000000b, 00011110b, 00000000b | |
.l60 db 00000000b, 00000001b, 11111010b, 10101010b, 10101111b, 11110000b, 00000000b | |
.l61 db 00000000b, 00000000b, 00001111b, 11111111b, 11111000b, 00000000b, 00000000b | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment