pastebin - collaborative debugging tool
kpaste.net RSS


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)

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