pastebin - collaborative debugging tool
kpaste.net RSS

Difference between
modified post 87fddc by Anonymous on Mon 14th Jan 2013 19:46
original post af1 by Anonymous on Mon 14th Jan 2013 18:54
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
55
SET_VSEGMENT:                       ;set up video segment
66
    MOV AX,0A000h                   ;point ES to VGA segment
77
    MOV ES,AX
88
VALUES:                             ;various values used for plotting later on
99
    MOV CX,15                      ;length of line.  used for REP
1010
%macro get_offset 2             ;%1 = X and %2 = y . calculates the offset location
11-
    PUSH AX
12-
    PUSH BX
1311
    MOV AX,%1                       ;copy X location passed to macro to AX
1412
    MOV BX,%2                       ;copy Y location passed to macro to BX
1513
	MOV DI,AX                       ;put X location into DI
1614
    MOV DX,BX                       ;and Y into DX
1715
    SHL BX,8                        ;Y * 2^8.  same as saying Y * 256
1816
    SHL DX,6                        ;Y * 2^8.  same as saying Y * 64
1917
    ADD DX,BX                       ;add the two together
2018
    ADD DI,BX                       ;and add the X location
21-
	POP BX
22-
	POP AX
2319
%endmacro                       ;end macro
2420
2521
2622
2723
2824
2925
; starting Y location.
30-
MOV BX,100
26+
	MOV BX,0x64
3327
MOV AL,0
28+
LL1:
3434
STOSB
35-
MOV AX,102                      ;X location
35+
	POP BX
36-
get_offset AX,BX
36+
	POP AX
37-
MOV AL,1
37+
	ADD AX,0x02
38-
STOSB
38+
	ADD AL,0x01
39-
MOV AX,104                      ;X location
39+
	CMP AL,0xc8
40-
get_offset AX,BX
40+
	JNE LL2
41-
MOV AL,2
41+
42-
STOSB
42+
	ADD BX,0x01
43-
MOV AX,106                      ;X location
43+
	CMP BX,0xF
44-
get_offset AX,BX
44+
	JNE LL1
45-
MOV AL,3
45+
46-
STOSB
46+
WAIT_FOR_KEY_PRESS:
47-
MOV AX,108                      ;X location
47+
 	MOV AH,0x00
48-
get_offset AX,BX
48+
 	INT 0x16
49-
MOV AL,4
49+
REBOOT:
50-
STOSB
50+
 	DB 0xEA
51-
MOV AX,110                      ;X location
51+
 	DW 0x0000
52-
get_offset AX,BX
52+
 	DW 0xFFFF
53-
MOV AL,5
53+
times 0200h - 2 - ($ - $$)  db 0
54-
STOSB
54+
SIGNATURE DW 0xAA55
55-
MOV AX,112                      ;X location
55+
56-
get_offset AX,BX
56+
57-
MOV AL,6
57+
58-
STOSB
58+
59-
MOV AX,114                      ;X location
59+
60-
get_offset AX,BX
60+
61-
MOV AL,7
61+
62-
STOSB
62+
63-
MOV AX,116                      ;X location
63+
64-
get_offset AX,BX
64+
65-
MOV AL,8
65+
66-
STOSB
66+
67-
MOV AX,118                      ;X location
67+
68-
get_offset AX,BX
68+
69-
MOV AL,9
69+
70-
STOSB
70+
71-
MOV AX,120                      ;X location
71+
72-
get_offset AX,BX
72+
73-
MOV AL,10
73+
74-
STOSB
74+
75-
MOV AX,122                      ;X location
75+
76-
get_offset AX,BX
76+
77-
MOV AL,11
77+
78-
STOSB
78+
79-
MOV AX,124                      ;X location
79+
80-
get_offset AX,BX
80+
81-
MOV AL,12
81+
82-
STOSB
82+
83-
MOV AX,126                      ;X location
83+
84-
get_offset AX,BX
84+
85-
MOV AL,13
85+
86-
STOSB
86+
87-
MOV AX,128                      ;X location
87+
88-
get_offset AX,BX
88+
89-
MOV AL,14
89+
90-
STOSB
90+
91-
MOV AX,130                      ;X location
91+
92-
get_offset AX,BX
92+
93-
MOV AL,15
93+
94-
STOSB
94+
95-
MOV AX,132                      ;X location
95+
96-
get_offset AX,BX
96+
97-
MOV AL,16
97+
98-
STOSB
98+
99-
ADD BX,01h
99+
100-
CMP BX,200
100+
101-
JNE LOOP_LABEL
101+
102102
103-
WAIT_FOR_KEY_PRESS:
103+
104-
 	MOV AH,0x00
104+
105-
 	INT 0x16
105+
106-
REBOOT:
106+
107-
 	DB 0xEA
107+
108-
 	DW 0x0000
108+
109-
 	DW 0xFFFF
109+
110-
SIGNATURE DW 0xAA55
110+

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