|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
ok, never mind. I'm using windows 98 to program in, and apparently ctrl+s for saving wasn't thought of yet.
![]() |
|
#3
|
||||
|
||||
|
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 Short • Understanding the C/C++ Preprocessor Taming Python • A 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 |
|
#4
|
|||
|
|||
|
Hey, ya I forgot to mention, I'm using notepad.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > Simple Line Repeat Draw Program |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|