D dogfish Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-18 #1 如何使高档工业控制机+win98+应用软件,和80196/8098使用并行口通讯, 有主板并行口8255的各脚和并行口的各角的对应关系也可以。
D dogfish Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-22 #5 最好不用win32函数,用汇编语言怎么控制并行口各个管脚,如数据线, 状态线,中断线。我用的是delphi内嵌汇编编程。
I iie Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #6 pascal内嵌汇编有专门的语法的,一般的 asm mov al, $55 mov dx, $378 out dx, al end;
X xujiancai Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-25 #7 我做过实验的,如何控制8255,各处汇编程序给你吧: NAME EX3_2ASM PB55 EQU 219H PC55 EQU 21AH P55CTL EQU 21BH ;方式0 B,C口输出 MODE EQU 10000000B DATA SEGMENT MESS DB 'PRESS ANY KEY TO EXIT !',0DH,0AH,'$' DATA ENDS CODE SEGMENT ASSUME CS:CODE,DSATA START: MOV AX,DATA MOV DS,AX ;输出提示 MOV AH,09H MOV DX,OFFSET MESS INT 21H ;写控制字 MOV DX,P55CTL MOV AL,MODE OUT DX,AL ;输出B口数据 L1: MOV BX,0010H L2: MOV DX,PB55 MOV AL,BL NOT AL OUT DX,AL ;输出C口数据 MOV DX,PC55 MOV AL,BH NOT AL OUT DX,AL CALL DELAY CALL DELAY CALL DELAY ;ANY KEY TO EXIT MOV AH,06H MOV DL,0FFH INT 21H JNZ EXIT ;左移 CMP BX,0FFF0H JE L1 ADD BX,0010H JMP L2 EXIT: MOV AH,4CH INT 21H ; DELAY PROC NEAR PUSH CX MOV CX,0 D1: LOOP D1 POP CX RET DELAY ENDP ; CODE ENDS END START
我做过实验的,如何控制8255,各处汇编程序给你吧: NAME EX3_2ASM PB55 EQU 219H PC55 EQU 21AH P55CTL EQU 21BH ;方式0 B,C口输出 MODE EQU 10000000B DATA SEGMENT MESS DB 'PRESS ANY KEY TO EXIT !',0DH,0AH,'$' DATA ENDS CODE SEGMENT ASSUME CS:CODE,DSATA START: MOV AX,DATA MOV DS,AX ;输出提示 MOV AH,09H MOV DX,OFFSET MESS INT 21H ;写控制字 MOV DX,P55CTL MOV AL,MODE OUT DX,AL ;输出B口数据 L1: MOV BX,0010H L2: MOV DX,PB55 MOV AL,BL NOT AL OUT DX,AL ;输出C口数据 MOV DX,PC55 MOV AL,BH NOT AL OUT DX,AL CALL DELAY CALL DELAY CALL DELAY ;ANY KEY TO EXIT MOV AH,06H MOV DL,0FFH INT 21H JNZ EXIT ;左移 CMP BX,0FFF0H JE L1 ADD BX,0010H JMP L2 EXIT: MOV AH,4CH INT 21H ; DELAY PROC NEAR PUSH CX MOV CX,0 D1: LOOP D1 POP CX RET DELAY ENDP ; CODE ENDS END START