pastebin - collaborative debugging tool
kpaste.net RSS

Difference between
modified post 88b0 by Anonymous on Mon 14th Jan 2013 20:49
original post 87fddc by Anonymous on Mon 14th Jan 2013 19:46
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
1111
    MOV AX,%1                       ;copy X location passed to macro to AX
1212
    MOV BX,%2                       ;copy Y location passed to macro to BX
1313
	MOV DI,AX                       ;put X location into DI
1414
    MOV DX,BX                       ;and Y into DX
1515
    SHL BX,8                        ;Y * 2^8.  same as saying Y * 256
1616
    SHL DX,6                        ;Y * 2^8.  same as saying Y * 64
1717
    ADD DX,BX                       ;add the two together
1818
    ADD DI,BX                       ;and add the X location
1919
%endmacro                       ;end macro
2020
2121
2222
2323
2424
2525
; starting Y location.
2626
	MOV BX,0x64
2727
	MOV AL,0
28-
LL1:
29-
3028
LL2:
3129
	push AX
3230
	push BX
3331
	get_offset AX,BX
3432
	STOSB
3533
	POP BX
3634
	POP AX
3735
	ADD AX,0x02
3836
	ADD AL,0x01
39-
	CMP AL,0xc8
37+
	CMP AL,0x0F
4038
	JNE LL2
4139
4240
	ADD BX,0x01
43-
	CMP BX,0xF
41+
	CMP BX,0xc8
44-
	JNE LL1
42+
	JNE LL2
4543
4644
WAIT_FOR_KEY_PRESS:
4745
 	MOV AH,0x00
4846
 	INT 0x16
4947
REBOOT:
5048
 	DB 0xEA
5149
 	DW 0x0000
5250
 	DW 0xFFFF
5351
times 0200h - 2 - ($ - $$)  db 0
5452
SIGNATURE DW 0xAA55

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