pastebin - collaborative debugging tool
kpaste.net RSS


Untitled
Posted by Anonymous on Mon 14th Jan 2013 19:46
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. LL1:
  29.  
  30. LL2:
  31.         push AX
  32.         push BX
  33.         get_offset AX,BX
  34.         STOSB
  35.         POP BX
  36.         POP AX
  37.         ADD AX,0x02
  38.         ADD AL,0x01
  39.         CMP AL,0xc8
  40.         JNE LL2
  41.  
  42.         ADD BX,0x01
  43.         CMP BX,0xF
  44.         JNE LL1
  45.  
  46. WAIT_FOR_KEY_PRESS:
  47.         MOV AH,0x00
  48.         INT 0x16
  49. REBOOT:
  50.         DB 0xEA
  51.         DW 0x0000
  52.         DW 0xFFFF
  53. times 0200h - 2 - ($ - $$)  db 0
  54. 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