Anyways, my problem is that I cannot seem to be able to load the byte at font2 to a register. When ever I directly mov the same byte to a register it works.
What am I doing wrong?
Here's the code... (fraction of a thing that should later on be able to draw 8x8 and 8x16 fonts...)
Code: Select all
jmp skip
font2: db 10101010b
skip:
mov al, 0x10
mov ah, 0x00
int 0x10
push word 50
push word 50
push word 550
push word 250
call draw_rect
add sp, 8
mov ah, 0
mov al, 10101010b ; IF I CHANGE THIS TO mov al, [font2] or mov al, font2 it stops working!
mov bh, 0
mov bl, 10000000b ; THIS IS A MASK I SHR ON EVERY ITERATION TO SEE IF PIXEL IS ON OR OFF IN WHAT SHOULD BE AT font2
mov si, 0
forloop:
cmp si, 8
je forend
mov cl, al
and cl, bl
cmp cl, 0
je skip2
push word 0x06 ;color
push word si ;x coordinate
push word 1d ;y coordinate for now.
call draw_pixel
add sp, 6
skip2:
shr bl, 1
inc si
jmp forloop
forend: