GIDForums  

Go Back   GIDForums > Computer Programming Forums > Assembly Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Jun-2008, 03:20
Darquenes Darquenes is offline
New Member
 
Join Date: Jun 2008
Posts: 3
Darquenes is on a distinguished road

Uses interrupts to set video mode and draw a line


Ok I have gotten this one partially down...but What is needed still is to have an interupt sudfunction to create second line moving downward from the orginal point....
This is my code, i cannot seem to get it to run two line running from the same point can someone edit this with notation as to where i needed to make my changes. Or Email me with help so I may edit this...


Please Email me with a solution please....

Code:
; video.asm ; uses interrupts to set video mode and draw a line include 'emu8086.inc' org 100h ; set location counter to 100h jmp CodeStart DataStart: xStart dw 50 ; x coordinate of line start yStart dw 50 ; y coordinate of line start length dw 25 ; length of line CodeStart: ; set the video mode 320x200, 256 colors mov al, 13h mov ah, 0 int 10h ; initialize cx (x coord) to xStart + length mov cx, xStart add cx, length ; loop from (xStart+length) to xStart to draw a horizontal line LoopStart: ; draw a pixel ; set color in al, x in cx, y in dx mov al, 50 mov dx, yStart ; set sub function value in ah to draw a pixel ; and invoke the interrupt mov ah, 0ch int 10h mov dx, yStart add dx,length ; decrement the x coord sub cx, 1 ; test to see if x coord has reached start value cmp cx, xStart ; continue loop if cx >= xStart jae LoopStart ret
Last edited by LuciWiz : 16-Jun-2008 at 07:27. Reason: Added code tags
  #2  
Old 16-Jun-2008, 07:34
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 1,031
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough

Re: Again sorry


What is the relation between this thread and the previous one you started?

Please give your threads more appropriate names, as "Please help me..." doesn't communicate what the thread is about... not by a long shot.
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
  #3  
Old 16-Jun-2008, 13:47
Darquenes Darquenes is offline
New Member
 
Join Date: Jun 2008
Posts: 3
Darquenes is on a distinguished road

Re: Uses interrupts to set video mode and draw a line


I'm sorry I don't really use forums much, but a friend of mine said that using the help of ppl on a forum could help me correct my self..

The relationship between the two is that the both somehow involve an inner array, yet I don't know how to start them and/or don't know where they go...
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:09.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.