🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3464

Problem with small graphic assembly prog.

#3464
From: Dan Newcombe
Date: Thu, 01 Oct 1992 11:51
29 lines
1977 bytes
Hi all...
  I wrote this small assembly program last night in Debug.  What it is
meant to do is to switch to the graphics mode, draw a green line, wait
for a keypress, then exit.  The program works fine if I run it from
inside of debug.  It also works fine if I write it to the boot sector
of a floopy and re-boot.  It does not completly work from the DOS prompt
though.  It does clear the screen into graphics mode, and it then waits
for the keypress and exits - No green line :(   Any help would be
greatly appreciated.
   Thanks!!!
     -Dan   STDN@VM.MARIST.EDU    STDN@MARIST

Here's the code:
20E8:0100 B400          MOV  AH,00       Function to change video mode
20E8:0102 B012          MOV  AL,12       Mode desired
20E8:0104 CD10          INT  10          Video Interuppt
20E8:0106 BB4002        MOV  BX,0240     Starting Coordinate/Counter
20E8:0109 81FB6002      CMP  BX,0260     See if counter is at end point
20E8:010D 740D          JZ   011C        If so, jump to 11C
20E8:010F 43            INC  BX          Increment Counter
20E8:0110 B40C          MOV  AH,0C       Function to put a pixel
20E8:0112 B002          MOV  AL,02       Color of the pixel
20E8:0114 89D9          MOV  CX,BX       Where I want the pixel(horiz.)
20E8:0116 B2A0          MOV  DL,A0       Where I want the pixel(vert)
20E8:0118 CD10          INT  10          Video Interuppt
20E8:011A EBED          JMP  0109        Jump to start of the loop
20E8:011C B401          MOV  AH,01       Function to get a character
20E8:011E CD21          INT  21          Dos Interuppt
20E8:011F CD20          INT  20          Dos Exit Interuppt
Technical Details
Message-ID: <9210011152.AA19223@nettlerash.berkeley.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ucbvax!MARIST.BITNET!STDN

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ucbvax!MARIST.BITNET!STDN
From: STDN@MARIST.BITNET (Dan Newcombe)
Newsgroups: comp.os.msdos.programmer
Subject: Problem with small graphic assembly prog.
Message-ID: <9210011152.AA19223@nettlerash.berkeley.edu>
Date: 1 Oct 92 11:51:26 GMT
Sender: usenet@ucbvax.BERKELEY.EDU
Lines: 29