Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 31st, 2008, 03:30 AM
Treymac Treymac is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 27 Treymac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 32 m 22 sec
Reputation Power: 0
Simple Line Repeat Draw Program

Hey guys. I'm adapting a simple program from my text just to try the concept that I will use in another way. Any ways, what I'm trying to do now is make a line repeat. My book has the program drawing the line once. So here is what I've done.

Code:
	MOV AX,0600H                    ;scroll the screen
	MOV BH,07                       ;normal attribute
	MOV CX,0000                     ;from row=00,column=00
	MOV DX,184FH                    ;to row=18H,column=4FH
	INT 10H                         ;invoke interrupt to clear screen

	MOV AH,00                       ;set mode
	MOV AL,06                       ;mode = 06 (CGA high resolution)
	INT 10H                         ;invoke interrupt to change mode

	MOV CX,100                      ;start line at column = 100
	MOV DX,50                       ;and row = 50

	JMP LOC                         ;jump to LOC

BACK:	MOV AH,0CH                      ;AH=0CH to draw line
	MOV AL,01                       ;pixels = white
	INT 10H                         ;invoke interrupt to draw a line
	INC CX                          ;increment horizontal position
	CMP CX,200                      ;draw line until column=200
	JNZ BACK                        ;if not equal, jump to BACK
	JMP LOC                         ;else, jump to LOC

LOC:	MOV CX,100			;set column back to 100
	DEC DX                          ;decrement row
	JMP BACK                        ;jump to back


I think it should work, I have no idea why it doesn't. Can anybody help me out here?
Thanks a lot.

Reply With Quote
  #2  
Old March 31st, 2008, 04:12 AM
Treymac Treymac is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 27 Treymac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 32 m 22 sec
Reputation Power: 0
ok, never mind. I'm using windows 98 to program in, and apparently ctrl+s for saving wasn't thought of yet.

Reply With Quote
  #3  
Old March 31st, 2008, 01:07 PM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is online now
Commie Mutant Traitor
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Location: The People's Republic of Berkeley
Posts: 1,083 Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 10 h 47 m 7 sec
Reputation Power: 446
Actually, it's going to depend on the editor you're using rather than the version of Windows. Which are you using, anyway?
__________________
Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
#define KINSEY (rand() % 7) λ Scheme is the Red Pill
Scheme in ShortUnderstanding the C/C++ Preprocessor
Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov

Reply With Quote
  #4  
Old March 31st, 2008, 01:38 PM
Treymac Treymac is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 27 Treymac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 32 m 22 sec
Reputation Power: 0
Hey, ya I forgot to mention, I'm using notepad.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Simple Line Repeat Draw Program


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway