- START:
- MOV AH,00h ;get into video mode. 00 = Set Video Mode
- MOV AL,13h ;13h = 320x240x16
- INT 10h
- SET_VSEGMENT: ;set up video segment
- MOV AX,0A000h ;point ES to VGA segment
- MOV ES,AX
- VALUES: ;various values used for plotting later on
- MOV CX,15 ;length of line. used for REP
- %macro get_offset 2 ;%1 = X and %2 = y . calculates the offset location
- MOV AX,%1 ;copy X location passed to macro to AX
- MOV BX,%2 ;copy Y location passed to macro to BX
- MOV DI,AX ;put X location into DI
- MOV DX,BX ;and Y into DX
- SHL BX,8 ;Y * 2^8. same as saying Y * 256
- SHL DX,6 ;Y * 2^8. same as saying Y * 64
- ADD DX,BX ;add the two together
- ADD DI,BX ;and add the X location
- %endmacro ;end macro
- ; starting Y location.
- MOV BX,0x64
- MOV AL,0
- LL2:
- push AX
- push BX
- get_offset AX,BX
- STOSB
- POP BX
- POP AX
- ADD AX,0x02
- ADD AL,0x01
- CMP AL,0x0F
- JNE LL2
- ADD BX,0x01
- CMP BX,0xc8
- JNE LL2
- WAIT_FOR_KEY_PRESS:
- MOV AH,0x00
- INT 0x16
- REBOOT:
- DB 0xEA
- DW 0x0000
- DW 0xFFFF
- times 0200h - 2 - ($ - $$) db 0
- SIGNATURE DW 0xAA55
Untitled
Posted by Anonymous on Mon 14th Jan 2013 20:49
raw | new post
view followups (newest first): Untitled by Anonymous
modification of post by Anonymous (view diff)
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.
kpaste.net RSS