| | |
Noob looking for guidance
Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2009
Posts: 19
Reputation:
Solved Threads: 0
Hi, I was using C++ to try to write objects to the screen, and decided to try this in a lower level language. I have searched the web and found some sample code:
Again, I did not write this, I found it at http://www.emu8086.com/dr/asm2html/a...phics.asm.html
My question is how would I go about compiling said code?
Assembly Syntax (Toggle Plain Text)
name "vga" ; this program draws a tiny rectangle in vga mode. org 100h jmp code ; dimensions of the rectangle: ; width: 10 pixels ; height: 5 pixels w equ 10 h equ 5 ; set video mode 13h - 320x200 code: mov ah, 0 mov al, 13h int 10h ; draw upper line: mov cx, 100+w ; column mov dx, 20 ; row mov al, 15 ; white u1: mov ah, 0ch ; put pixel int 10h dec cx cmp cx, 100 jae u1 ; draw bottom line: mov cx, 100+w ; column mov dx, 20+h ; row mov al, 15 ; white u2: mov ah, 0ch ; put pixel int 10h dec cx cmp cx, 100 ja u2 ; draw left line: mov cx, 100 ; column mov dx, 20+h ; row mov al, 15 ; white u3: mov ah, 0ch ; put pixel int 10h dec dx cmp dx, 20 ja u3 ; draw right line: mov cx, 100+w ; column mov dx, 20+h ; row mov al, 15 ; white u4: mov ah, 0ch ; put pixel int 10h dec dx cmp dx, 20 ja u4 ; pause the screen for dos compatibility: ;wait for keypress mov ah,00 int 16h ; return to text mode: mov ah,00 mov al,03 ;text mode 3 int 10h ret
My question is how would I go about compiling said code?
•
•
Join Date: Oct 2009
Posts: 19
Reputation:
Solved Threads: 0
Well, thanks for the help. Better than an STFW or RTFM i guess, I found a compiler (and emu) called emu8086.
![]() |
Similar Threads
Other Threads in the Assembly Forum
- Previous Thread: Needing some guidance
- Next Thread: C and Assembly Mixed-Mode Hex comparison program
| Thread Tools | Search this Thread |





