Search code examples
assemblyattributescharacterpixeltasm

Easier way to do character print with attribute in assembly


All in all I want to output this picture in assembly but the problem is I don't know how to work on grids and it is very confusing. What I want to ask is:

Are there other/easier ways to do this?

If not, then can you help me understand how to do this like my sample code?

Here's the picture: enter image description here

I just started coding it using grids but I imagine it's going to be so tedious and confusing because in this code I'm only trying to print one pixel and it's already showing errors because I'm confused with grids.

.model small
.code
org 100h

start:
        mov ah,06h
    mov bh,40h
    mov ch,10
    mov cl,0
    mov dh,5
    mov dl,0
    int 10h

    mov ah,02h
    mov dh,24
    mov dl,0
    mov bh,0    
    int 10h
    int 20h
end start

Solution

  • Since you're using VGA text mode anyway, you can store your picture as an array of constants and copy it to the VGA frame buffer http://wiki.osdev.org/Text_UI