看板Programming
标 题Re: [问题] 8051程式的问题...
发信站电电养鸡场 (Wed Jun 7 20:50:40 2006)
转信站ptt!ctu-reader!news.nctu!fcuee
8051...似乎没有lea int指令
这应该是80X86的程式...
※ 引述《[email protected] (霏歆)》之铭言:
> .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
--
人心就像降落伞 ◢██◣◢██◣
不打开来就毫无用武之地。 ████████
----纽约某处涂鸦 ◥██████◤
◥████◤
◥██◤
◥◤
--
║ 逢甲大学˙电电养鸡场 ▄▄▄▄▄▄ ═════════════════╗
║ Chicken.twbbs.org ▄▄ ID: acos ║
╚═════ ▄▄▄▄▄ FROM: 218-162-55-144.dynamic.hinet.net ║
1F:→ FaXin:我错了 <囧> 06/07 21:59