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


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

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

next_byte_load:
    mov al, ds:[bx+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 dl, 0eh
    jmp get_count

color_white:
    mov dl, 0fh
    jmp get_count

color_black:
    mov dl, 00h
    jmp get_count

color_red:
    mov dl, 04h

get_count:
    shl dl, 4
    mov dh, dl
    
    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, dh
    stosw
    loop draw_loop
    
    pop cx
    loop next_byte_load

hlt