⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 robot.txt

📁 一个朋友编写的机器人
💻 TXT
字号:
data segment
mess1 db '*****Welcome to using our clever robot*****',13,10,'$'
mess1len dw $-mess1-3
mess2 db 'the way of using:',13,10,'$'
mess2len dw $-mess2-3
mess3 db ' 1.Enter J you will found it jmping! ',13,10,'$'
mess3len dw $-mess3-3
mess4 db ' 2.Enter L you will found it hold left arm and leg.',13,10,'$'
mess4len dw $-mess4-3
mess5 db ' 3.Enter R you will found it hold right arm and leg.',13,10,'$'
mess5len dw $-mess5-3
mess6 db ' 4.Enter G you will found it moving.',13,10,'$'
mess6len dw $-mess6-3
mess7 db ' Keystrock ENTER ','$'
mess7len dw $-mess7-1
mess8 db 'ROBOT','$'
mess8len dw $-mess8-1
mess9 db 'Please input your choice: ','$'
mess9len dw $-mess9-1
brec dw 0
lrec dw 0
color db 0
data ends
code segment
assume cs:code,ds:data,es:data
begin: mov ax,data
mov ds,ax
call Login_ini
call Robot_ini
call Fat
mov ah,07
int 21h
mov ah,00
mov al,02
int 10h
mov ah,4ch
int 21h
Login_ini proc
mov ah,00
mov al,03
int 10h
lea si,mess1
mov di,mess1len
mov dh,05
mov dl,13h
mov bl,0eh
call setf ;she mess1 guang biao
L0: lea si,mess2
mov di,mess2len
mov dh,0ah
mov dl,6
mov bl,0eh
call setf
lea si,mess3
mov di,mess3len
mov dh,0ch
mov dl,6
mov bl,0eh
call setf
lea si,mess4
mov di,mess4len
mov dh,0eh
mov dl,06h
mov bl,0eh
call setf
lea si,mess5
mov di,mess5len
mov dh,10h
mov dl,06h
mov bl,0eh
call setf
lea si,mess6
mov di,mess6len
mov dh,12h
mov dl,06h
mov bl,0eh
call setf
lea si,mess7
mov di,mess7len
mov dh,17h
mov dl,60
mov bl,8eh
call setf
mov ah,01h
int 21h
cmp al,0dh
jne L0
ret
Login_ini endp
setf proc
L1:mov ah,02h
int 10h
mov al,[si]
mov cx,1
mov ah,09h
int 10h
inc si
inc dl
dec di
cmp di,0
jnz L1
ret
setf endp
Robot_ini proc
call Bcolor
call Robot_body
call Robot_neck
call Robot_head
call Robot_leg
call Robot_line
call Robot_face
call Robot_nose
call Robot_setfou
ret 
Robot_ini endp
Bcolor proc
mov color,00h
mov brec,0000
mov lrec,184fh
call Srcen
ret
Bcolor endp
Srcen proc
mov ax,0600h
mov bh,color
mov cx,brec
mov dx,lrec
int 10h
ret
Srcen endp
Robot_body proc
mov color,30h
mov brec,081fh
mov lrec,0e31h
call Srcen
mov dh,0eh ;zhuang shi
mov dl,23h
mov ah,02
int 10h
mov ah,09h
mov al,'*'
mov bl,3dh
mov cx,12
int 10h
mov color,00h
mov brec,0a22h
mov lrec,0e22h
call Srcen
mov color,00h
mov brec,0a2eh
mov lrec,0e2eh
call Srcen 
lea si,mess8
mov di,mess8len
mov dh,0bh
mov dl,26h
mov bl,34h
call setf
ret
Robot_body endp
Robot_neck proc
mov color,20h
mov brec,0726h
mov lrec,072ah
call Srcen
ret
Robot_neck endp
Robot_head proc
mov color,70h
mov brec,0323h
mov lrec,062dh
call Srcen
mov brec,0421h
mov lrec,0522h
call Srcen
mov brec,042eh
mov lrec,052fh
call Srcen
ret
Robot_head endp
Robot_leg proc
mov color,60h
mov brec,0f24h
mov lrec,152ch
call Srcen
mov color,00h
mov brec,0f28h
mov lrec,1528h
call Srcen
ret
Robot_leg endp
Robot_line proc
mov dh,2 ; tian xian L
mov dl,25h
L3: mov ah,02h
int 10h
mov ah,09h
mov al,'\'
mov bl,02h
mov cx,2
int 10h
dec dl
dec dh
cmp dh,0
jne L3
mov dh,2 ;tian xian R
mov dl,2ah
L4: mov ah,02h
int 10h
mov ah,09h
mov al,'/'
mov bl,02h
mov cx,2
int 10h
inc dl
dec dh
cmp dh,0
jne L4
mov dh,0 ;tian xian L
mov dl,23h
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
mov dl,2ch ;tian xian R
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
ret
Robot_line endp
Robot_face proc
mov dl,25h
L5: mov dh,4
mov ah,02
int 10h
mov ah,09h
mov al,02
mov bl,0f2h
mov cx,1
int 10h
cmp dl,2bh
je L6
mov dl,2bh
jmp L5
L6: ret
Robot_face endp
Robot_nose proc
mov dh,05
mov dl,28h
mov ah,02
int 10h
mov ah,09h
mov al,'V'
mov bl,71h
mov cx,1
int 10h
mov dh,06
mov dl,27h
mov ah,02
int 10h
mov ah,09h
mov al,'~'
mov bl,74h
mov cx,3
int 10h
lea si,mess7
mov di,mess7len
mov dh,17h
mov dl,60
mov bl,8eh
call setf
ret
Robot_nose endp
Robot_setfou proc
lea si,mess9
mov di,mess9len
mov dh,17h
mov dl,03
mov bl,0eh
call setf
ret
Robot_setfou endp
Fat proc
L111: mov ah,01
int 21h
cmp al,'l'
jne L7
call Robot_larmleg
jmp L111
L7: cmp al,'L'
jne L8
call Robot_larmleg
jmp L111
L8: cmp al,'r'
jne L9
call Robot_rarmleg
jmp L111
L9: cmp al,'R'
jne L10
call Robot_rarmleg
jmp L111
L10: cmp al,'g'
jne L11
call Robot_move
jmp L111
L11: cmp al,'G'
jne L15
call Robot_move
jmp L111
L15: cmp al,'j'
jne L16
call Robot_jmpe
jmp L111
L16: cmp al,'J'
jne L12
call Robot_jmpe
jmp L111
L12: cmp al,0dh
jne L111
ret
Fat endp
Robot_larmleg proc
mov color,00 ;clear
mov brec,081fh
mov lrec,0e22h
call Srcen
mov color,30h ;L_arm
mov brec,0816h
mov lrec,0922h
call Srcen
mov color,00h ;clear
mov brec,1324h
mov lrec,1527h
call Srcen
mov color,60h ;L_leg
mov brec,111dh
mov lrec,1223h
call Srcen
call Timer
call Robot_ini
ret
Robot_larmleg endp
Robot_rarmleg proc
mov color,00h ;clear
mov brec,0a2eh
mov lrec,0e32h
call Srcen
mov color,30h ;R_arm
mov brec,082eh
mov lrec,093ah
call Srcen
mov color,00h ;clear
mov brec,1328h
mov lrec,152ch
call Srcen
mov color,60h ;R_leg
mov brec,112ch
mov lrec,1232h
call Srcen
call Timer
call Robot_ini
ret
Robot_rarmleg endp
Timer proc
mov ax,0000
L14:mov bx,0000
L13:inc bx
cmp bx,0ffffh
jne L13
inc ax
cmp ax,0fffh
jne L14
ret
Timer endp
Robot_move proc
call Bcolor
call Robot_body_m
call Robot_neck_m
call Robot_head_m
call Robot_leg_m
call Robot_line_m
call Robot_face_m
call Robot_nose_m
call Robot_setfou
call Timer
call Robot_lmove
call Timer
call Robot_ini
ret 
Robot_move endp
Robot_body_m proc
mov color,30h
mov brec,083dh
mov lrec,0e4fh
call Srcen
mov dh,0eh ;zhuang shi
mov dl,41h
mov ah,02
int 10h
mov ah,09h
mov al,'*'
mov bl,3dh
mov cx,12
int 10h
mov color,00h
mov brec,0a40h
mov lrec,0e40h
call Srcen
mov color,00h
mov brec,0a4ch
mov lrec,0e4ch
call Srcen 
lea si,mess8
mov di,mess8len
mov dh,0bh
mov dl,44h
mov bl,34h
call setf
ret
Robot_body_m endp
Robot_neck_m proc
mov color,20h
mov brec,0744h
mov lrec,0748h
call Srcen
ret
Robot_neck_m endp
Robot_head_m proc
mov color,70h
mov brec,0341h
mov lrec,064bh
call Srcen
mov brec,043fh
mov lrec,0540h
call Srcen
mov brec,044ch
mov lrec,054dh
call Srcen
ret
Robot_head_m endp
Robot_leg_m proc
mov color,60h
mov brec,0f42h
mov lrec,154ah
call Srcen
mov color,00h
mov brec,0f46h
mov lrec,1546h
call Srcen
ret
Robot_leg_m endp
Robot_line_m proc
mov dh,2 ; tian xian L
mov dl,43h
M3: mov ah,02h
int 10h
mov ah,09h
mov al,'\'
mov bl,02h
mov cx,2
int 10h
dec dl
dec dh
cmp dh,0
jne M3
mov dh,2 ;tian xian R
mov dl,48h
M4: mov ah,02h
int 10h
mov ah,09h
mov al,'/'
mov bl,02h
mov cx,2
int 10h
inc dl
dec dh
cmp dh,0
jne M4
mov dh,0 ;tian xian L
mov dl,41h
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
mov dl,4ah ;tian xian R
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
ret
Robot_line_m endp
Robot_face_m proc
mov dl,43h
M5: mov dh,4
mov ah,02
int 10h
mov ah,09h
mov al,02
mov bl,0f2h
mov cx,1
int 10h
cmp dl,49h
je M6
mov dl,49h
jmp M5
M6: ret
Robot_face_m endp
Robot_nose_m proc
mov dh,05
mov dl,46h
mov ah,02
int 10h
mov ah,09h
mov al,'V'
mov bl,71h
mov cx,1
int 10h
mov dh,06
mov dl,45h
mov ah,02
int 10h
mov ah,09h
mov al,'~'
mov bl,74h
mov cx,3
int 10h
lea si,mess7
mov di,mess7len
mov dh,17h
mov dl,60
mov bl,8eh
call setf
ret
Robot_nose_m endp
Robot_jmpe proc
call Bcolor
call Robot_body_j
call Robot_neck_j
call Robot_head_j
call Robot_leg_j
call Robot_line_j
call Robot_face_j
call Robot_nose_j
call Robot_setfou
call Timer
call Robot_ini
ret 
Robot_jmpe endp
Robot_body_j proc
mov color,30h
mov brec,061fh
mov lrec,0c31h
call Srcen
mov dh,0ch ;zhuang shi
mov dl,23h
mov ah,02
int 10h
mov ah,09h
mov al,'*'
mov bl,3dh
mov cx,12
int 10h
mov color,00h
mov brec,0822h
mov lrec,0c22h
call Srcen
mov color,00h
mov brec,082eh
mov lrec,0c2eh
call Srcen 
lea si,mess8
mov di,mess8len
mov dh,09h
mov dl,26h
mov bl,34h
call setf
ret
Robot_body_j endp
Robot_neck_j proc
mov color,20h
mov brec,0526h
mov lrec,052ah
call Srcen
ret
Robot_neck_j endp
Robot_head_j proc
mov color,70h
mov brec,0123h
mov lrec,042dh
call Srcen
mov brec,0221h
mov lrec,0322h
call Srcen
mov brec,022eh
mov lrec,032fh
call Srcen
ret
Robot_head_j endp
Robot_leg_j proc
mov color,60h
mov brec,0d24h
mov lrec,132ch
call Srcen
mov color,00h
mov brec,0d28h
mov lrec,1328h
call Srcen
ret
Robot_leg_j endp
Robot_line_j proc
mov dh,0 ; tian xian L
mov dl,25h
J3: mov ah,02h
int 10h
mov ah,09h
mov al,'\'
mov bl,02h
mov cx,2
int 10h
dec dl
dec dh
cmp dh,-1
jne J3
mov dh,0 ;tian xian R
mov dl,2ah
J4: mov ah,02h
int 10h
mov ah,09h
mov al,'/'
mov bl,02h
mov cx,2
int 10h
inc dl
dec dh
cmp dh,-1
jne J4
ret
Robot_line_j endp

Robot_face_j proc
mov dl,25h
J5: mov dh,2
mov ah,02
int 10h
mov ah,09h
mov al,02
mov bl,0f2h
mov cx,1
int 10h
cmp dl,2bh
je J6
mov dl,2bh
jmp J5
J6: ret
Robot_face_j endp
Robot_nose_j proc
mov dh,03
mov dl,28h
mov ah,02
int 10h
mov ah,09h
mov al,'V'
mov bl,71h
mov cx,1
int 10h
mov dh,04
mov dl,27h
mov ah,02
int 10h
mov ah,09h
mov al,'~'
mov bl,74h
mov cx,3
int 10h
lea si,mess7
mov di,mess7len
mov dh,15h
mov dl,60
mov bl,8eh
call setf
ret
Robot_nose_j endp
Robot_lmove proc
call Bcolor
call Robot_body_ml
call Robot_neck_ml
call Robot_head_ml
call Robot_leg_ml
call Robot_line_ml
call Robot_face_ml
call Robot_nose_ml
call Robot_setfou
ret 
Robot_lmove endp
Robot_body_ml proc
mov color,30h
mov brec,0807h
mov lrec,0e19h
call Srcen
mov dh,0eh ;zhuang shi
mov dl,0bh
mov ah,02
int 10h
mov ah,09h
mov al,'*'
mov bl,3dh
mov cx,12
int 10h
mov color,00h
mov brec,0a0ah
mov lrec,0e0ah
call Srcen
mov color,00h
mov brec,0a16h
mov lrec,0e16h
call Srcen 
lea si,mess8
mov di,mess8len
mov dh,0bh
mov dl,0eh
mov bl,34h
call setf
ret
Robot_body_ml endp
Robot_neck_ml proc
mov color,20h
mov brec,070eh
mov lrec,0712h
call Srcen
ret
Robot_neck_ml endp
Robot_head_ml proc
mov color,70h
mov brec,030bh
mov lrec,0615h
call Srcen
mov brec,0409h
mov lrec,050ah
call Srcen
mov brec,0416h
mov lrec,0517h
call Srcen
ret
Robot_head_ml endp
Robot_leg_ml proc
mov color,60h
mov brec,0f0ch
mov lrec,1514h
call Srcen
mov color,00h
mov brec,0f10h
mov lrec,1510h
call Srcen
ret
Robot_leg_ml endp
Robot_line_ml proc
mov dh,2 ; tian xian L
mov dl,0dh
ML3: mov ah,02h
int 10h
mov ah,09h
mov al,'\'
mov bl,02h
mov cx,2
int 10h
dec dl
dec dh
cmp dh,0
jne ML3
mov dh,2 ;tian xian R
mov dl,12h
ML4: mov ah,02h
int 10h
mov ah,09h
mov al,'/'
mov bl,02h
mov cx,2
int 10h
inc dl
dec dh
cmp dh,0
jne ML4
mov dh,0 ;tian xian L
mov dl,0bh
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
mov dl,14h ;tian xian R
mov ah,02h
int 10h
mov ah,09h
mov al,'O'
mov cx,2
int 10h
ret
Robot_line_ml endp
Robot_face_ml proc
mov dl,0dh
ML5: mov dh,4
mov ah,02
int 10h
mov ah,09h
mov al,02
mov bl,0f2h
mov cx,1
int 10h
cmp dl,13h
je ML6
mov dl,13h
jmp ML5
ML6: ret
Robot_face_ml endp
Robot_nose_ml proc
mov dh,05
mov dl,10h
mov ah,02
int 10h
mov ah,09h
mov al,'V'
mov bl,71h
mov cx,1
int 10h
mov dh,06
mov dl,0fh
mov ah,02
int 10h
mov ah,09h
mov al,'~'
mov bl,74h
mov cx,3
int 10h
lea si,mess7
mov di,mess7len
mov dh,17h
mov dl,60
mov bl,8eh
call setf
ret
Robot_nose_ml endp
code ends
end begin 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -