Functions of the board
PA 200
26
; TASM
; Writes digital outputs of a PA200 board
; Used compiler: TASM version 1.0 mode SMALL
Basic_Address_PA200 = 390h ; Basic address of PA200 board
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
.CODE
MOV AX,@DATA
MOV DS,AX ; Initializes data segment
; Example 1 :
; Reading occurs when 8 bits have been written 4 times
MOV DX,Basic_Address_PA200
MOV AX,0AA55h
PUSH AX
OUT DX,AL ; Bit 0 of value "AL"
; on digital output number 1
MOV AL,AH
INC DX
OUT DX,AL ; Bit 7 of value "AL"
; on digital output number 16
POP AX
INC DX
OUT DX,AL ; Bit 0 of value "AL"
; on digital output number 17
MOV AL,AH
INC DX
OUT DX,AL ; Bit 7 of value "AL"
; on digital output number 32
MOV AH,4CH ; Back to DOS
INT 21H
END
'
TURBO BASIC
' Writes digital outputs of a PA200 board
' Used compiler: TURBO BASIC version 1.00
Basic_AddressPA200% = &H390 ' Basic address of PA200 board
' Writing value &H0AA on Less Significant Byte '
' Writing value &H055 on Most Significant Byte ' 16 Bit LSW
' Writing value &H0AA on Less Significant Byte '
' Writing value &H055 on Most Significant Byte ' 16 Bit MSW
' LSW
out Basic_AddressPA200%, &H0AA ' Bit 0 of value &H0AA on
' digital output number 1
out Basic_AddressPA200% + 1, &H055 ' Bit 7 of value &H055 on
' digital output number 16
MSW
out Basic_AddressPA200% + 2, &H0AA ' Bit 0 of value &H0AA on
' digital output number 17
out Basic_AddressPA200% + 3, &H055 ' Bit 7 of value &H055 on
' digital output number 32