Загрузка данных


;!SaveMemory = True
mov byte ptr ds:[bx]+0,00fh
mov byte ptr ds:[bx]+1,005h
mov byte ptr ds:[bx]+2,004h
mov byte ptr ds:[bx]+3,010h
mov byte ptr ds:[bx]+4,00fh
mov byte ptr ds:[bx]+5,010h
mov byte ptr ds:[bx]+6,004h
mov byte ptr ds:[bx]+7,004h
mov byte ptr ds:[bx]+8,011h
mov byte ptr ds:[bx]+9,00fh
mov byte ptr ds:[bx]+10,011h
mov byte ptr ds:[bx]+11,004h
mov byte ptr ds:[bx]+12,004h
mov byte ptr ds:[bx]+13,012h
mov byte ptr ds:[bx]+14,00eh
mov byte ptr ds:[bx]+15,012h
mov byte ptr ds:[bx]+16,004h
mov byte ptr ds:[bx]+17,004h
mov byte ptr ds:[bx]+18,01fh
mov byte ptr ds:[bx]+19,002h
mov byte ptr ds:[bx]+20,004h
mov byte ptr ds:[bx]+21,010h
mov byte ptr ds:[bx]+22,032h
mov byte ptr ds:[bx]+23,000h
mov byte ptr ds:[bx]+24,011h
mov byte ptr ds:[bx]+25,032h
mov byte ptr ds:[bx]+26,000h
mov byte ptr ds:[bx]+27,010h
mov byte ptr ds:[bx]+28,004h
mov byte ptr ds:[bx]+29,010h
mov byte ptr ds:[bx]+30,030h
mov byte ptr ds:[bx]+31,010h
mov byte ptr ds:[bx]+32,000h
mov byte ptr ds:[bx]+33,030h
mov byte ptr ds:[bx]+34,010h
mov byte ptr ds:[bx]+35,004h
mov byte ptr ds:[bx]+36,004h
mov byte ptr ds:[bx]+37,010h
mov byte ptr ds:[bx]+38,030h
mov byte ptr ds:[bx]+39,011h
mov byte ptr ds:[bx]+40,030h
mov byte ptr ds:[bx]+41,010h
mov byte ptr ds:[bx]+42,004h
mov byte ptr ds:[bx]+43,003h
mov byte ptr ds:[bx]+44,011h
mov byte ptr ds:[bx]+45,033h
mov byte ptr ds:[bx]+46,011h
mov byte ptr ds:[bx]+47,033h
mov byte ptr ds:[bx]+48,011h
mov byte ptr ds:[bx]+49,003h
mov byte ptr ds:[bx]+50,002h
mov byte ptr ds:[bx]+51,01fh
mov byte ptr ds:[bx]+52,002h
mov byte ptr ds:[bx]+53,001h
mov byte ptr ds:[bx]+54,01fh
mov byte ptr ds:[bx]+55,001h
mov byte ptr ds:[bx]+56,000h
mov byte ptr ds:[bx]+57,01fh
mov byte ptr ds:[bx]+58,000h
mov byte ptr ds:[bx]+59,000h
mov byte ptr ds:[bx]+60,01fh
mov byte ptr ds:[bx]+61,000h
mov byte ptr ds:[bx]+62,000h
mov byte ptr ds:[bx]+63,014h
mov byte ptr ds:[bx]+64,000h
mov byte ptr ds:[bx]+65,016h
mov byte ptr ds:[bx]+66,000h
mov byte ptr ds:[bx]+67,014h
mov byte ptr ds:[bx]+68,000h

mov bx, 0
mov ax, 0
mov cx, 69
mov dx, 0
mov si, 0
mov bp, 0
mov di, 0f600h

next_byte_load:
    mov al, ds:[si]
    inc si
    mov ah, al
    
    shr al, 4
    
    cmp al, 0
    je color_white
    cmp al, 1
    je color_black
    cmp al, 2
    je color_red
    
    mov al, 14
    jmp get_count

color_white:
    mov al, 15
    jmp get_count
color_black:
    mov al, 0
    jmp get_count
color_red:
    mov al, 4

get_count:
    shl al, 4
    mov dl, al
    
    and ah, 0fh
    xor al, al
    mov al, ah
    inc al
    push cx
    mov cl, al
    xor al, al

draw_loop:
    mov al, 20h
    mov ah, dl
    stosw
    stosw
    
    inc bp
    cmp bp, 22
    jne skip_newline
    
    xor bp, bp
    add di, 72

skip_newline:
    loop draw_loop
    
    pop cx
    loop next_byte_load

hlt