作者FaXin (霏歆)
看板Programming
标题[问题] 8051程式的问题...
时间Wed Jun 7 20:26:09 2006
.MODEL SMALL
.STACK
.DATA
port1 equ 3e0h
port2 equ 3e4h
port3 equ 3e8h
table db 40h,79h,24h,30h,19h,12h,03h,58h,00h
strg1 db 'program normal end',10,13,'$'
strg2 db 'No switch set [ON]',10,13,'$'
[ showstr MACRO buffer <==请问这四行的功用是什麽0.0???
lea dx,buffer
mov ah,09
int 21h ]
ENDM
.CODE
start: mov ax,@data
mov ds,ax
lea bx,table
mov dx,port1
in al,dx
mov cl,8
lp1:
shr al,1
jnc pas1
mov ah,09
sub ah,cl
mov al,ah
xlat table
out dx,al
showstr strg1
jmp exit
pas1:
loop lp1
showstr strg2
exit:
mov ah,4ch
int 21h
end start
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.229.194.232
1F:推 costbook:好像不是8051 06/07 20:39
2F:→ FaXin:是吗 <囧> 06/07 20:48
3F:推 final01:这很明显是x86~那几行是巨集~功能是可以印出字串 06/07 20:57