pastebin - collaborative debugging tool
kpaste.net RSS

Difference between
modified post 09d13b by Anonymous on Tue 15th Jan 2013 01:19
original post 88b0 by Anonymous on Mon 14th Jan 2013 20:49
Download diff
Show old version | new version | both versions

    
11
START:
22
	MOV AH,00h                      ;get into video mode.  00 = Set Video Mode
33
    MOV AL,13h                      ;13h = 320x240x16
44
    INT 10h
5-
SET_VSEGMENT:                       ;set up video segment
5+
; starting X & Y location + starting colour
6-
    MOV AX,0A000h                   ;point ES to VGA segment
6+
    MOV CX,0
7-
    MOV ES,AX
7+
    MOV DX,0
8-
VALUES:                             ;various values used for plotting later on
8+
    MOV AL,0
9-
    MOV CX,15                      ;length of line.  used for REP
9+
LL1:
10-
%macro get_offset 2             ;%1 = X and %2 = y . calculates the offset location
10+
    MOV CX,0
11-
    MOV AX,%1                       ;copy X location passed to macro to AX
11+
ResetAL:
12-
    MOV BX,%2                       ;copy Y location passed to macro to BX
12+
    MOV AL,0x00
13-
	MOV DI,AX                       ;put X location into DI
13+
LL2:
14-
    MOV DX,BX                       ;and Y into DX
14+
    MOV AH,0x0C
15-
    SHL BX,8                        ;Y * 2^8.  same as saying Y * 256
15+
    MOV BX,0x1
16-
    SHL DX,6                        ;Y * 2^8.  same as saying Y * 64
16+
    INT 0x10
17-
    ADD DX,BX                       ;add the two together
17+
    CMP CX,319
18-
    ADD DI,BX                       ;and add the X location
18+
    JE NLINE
19-
%endmacro                       ;end macro
19+
    JNE Continue
20-
20+
Continue:
21-
21+
    ADD CX,0x01
22-
22+
    ADD AL,0x01
23-
23+
    CMP AL,16
24-
24+
    JE ResetAL
25-
; starting Y location.
25+
    JNE LL2
26-
	MOV BX,0x64
26+
NLINE:
27-
	MOV AL,0
27+
    ADD DX,1
28-
LL2:
28+
    CMP DX,240
29-
	push AX
29+
    JL LL1
30-
	push BX
30+
WAIT_FOR_KEY_PRESS:
31-
	get_offset AX,BX
31+
    MOV AH,0x00
32-
	STOSB
32+
    INT 0x16
33-
	POP BX
33+
REBOOT:
34-
	POP AX
34+
    DB 0xEA
35-
	ADD AX,0x02
35+
    DW 0x0000
36-
	ADD AL,0x01
36+
    DW 0xFFFF
37-
	CMP AL,0x0F
37+
times 0200h - 2 - ($ - $$)  db 0
38-
	JNE LL2
38+
SIGNATURE DW 0xAA55
3939
40-
	ADD BX,0x01
40+
41-
	CMP BX,0xc8
41+
42-
	JNE LL2
42+
4343
44-
WAIT_FOR_KEY_PRESS:
44+
45-
 	MOV AH,0x00
45+
46-
 	INT 0x16
46+
47-
REBOOT:
47+
48-
 	DB 0xEA
48+
49-
 	DW 0x0000
49+
50-
 	DW 0xFFFF
50+
51-
times 0200h - 2 - ($ - $$)  db 0
51+
52-
SIGNATURE DW 0xAA55
52+

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at