VGA Assembly Language Tutorials
Does anyone know where I could find some good tutorials on programming in mode 13h in Assembly without having to rely on any DOS interrupts?
Anyone know of any online tutorials on this topic...If so, where can I find ''em. Any suggestions are much appreciated!
I think it was chapter 30 that tells you everything about VGA and gives all the asselbly listings you need for it.
You can read Michael Abrash''s book on the IT knowledge website. Here''s a link to the book. You need to subscribe though. You can get up to 30 days free (you usually get two weeks free), and then you need to start paying for the services provide. Once you register you can read all the books that are there.
btw, I''ll put something together, like a simple program that plots pixels on the VGA screen in ASM, as a sample code for you to work with. Once I get a chance that is.
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
btw, I''ll put something together, like a simple program that plots pixels on the VGA screen in ASM, as a sample code for you to work with. Once I get a chance that is.
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
Hey Gladiator, thanks. That sounds real good. I''ll also have to check out that site you mentioned.
Some links to graphics/game programming (not ASM specific though).
Here''s an ASM tutorial and the main page where you''ll find A LOT more tutorials on graphics programming in DOS, and ASM language.
Here''s some code from me too. If you need more help/explanation, please let me know!
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
Here''s an ASM tutorial and the main page where you''ll find A LOT more tutorials on graphics programming in DOS, and ASM language.
Here''s some code from me too. If you need more help/explanation, please let me know!
.model tiny.code org 100hstart: mov ax, 0013h ;\ Get into mode 13h call SetMode ;/ ;; Plots a white pixel at the center of the screen ;; PutPixel(160, 100, 15) mov bx, 160 ; BX = X-coord mov dx, 100 ; DX = Y-coord mov al, 15 ; AL = Color call PutPixel ; Plot the pixel mov ax, 0003h ;\ Go back to text mode call SetMode ;/ mov ax, 4c00h ;\ Exit your program and give int 21h ;/ the control back to DOS;///////////////;// AX = Mode //;///////////////SetMode proc near int 10h retSetMode endp;////////////////////////////////;// BX = X; DX = Y; AL = Color //;////////////////////////////////PutPixel proc near push di ; save DI because we''re going to use it push 0A000h ;\ ES = VGA Address (A000:0000) pop es ;/ Faster than "mov ax, 0A000h" shl dx, 6 ; Y(DI) = (Y << 8) + (Y << 6) mov di, dx ; Basically, shifts the Y value to the left shl di, 2 ; by 6, and then moves it to another register, add di, dx ; shifting it by 2 to the left. Now we have ; the Y coord shifted by 8 in one register, ; the Y coord shiften by 6 in another register ; Then we just add both and we get Y*320 add di, bx ; location = Y + X mov es:[di], al ; Store pixel at location (x,y) in the VGA pop di ; restore DI''s contents ret ; ReturnPutPixel endpend start
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
Copy and paste into notepad
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement