; this module contains the code which is involved in the ; handling of the list device ; externals from ccpmxios main extrn poll:near public io_listst public io_list public listst public lcb_tab ; ********************************************************* ; * * ; * 8255 PROGRAMMABLE PERIPHERAL DEVICE * ; * 4/7/83 dwg * ; ********************************************************* LSTP_BASE EQU 40H ; BASE I/O ADDR OF 8255 LSTPA EQU LSTP_BASE ; PORT A LSTPB EQU LSTP_BASE+2 ; PORT B LSTPMD EQU LSTP_BASE+6 ; CONTROL MODE ; the following equates are used to feed a db at the end of ccpmxios.a86 ; this is used to determine the printer protocol to be used parallel eject io_listst: ;list devices are on poll table ; entry: DL = device ; exit: AL = 0 if not ready ; 0ffh if ready ; BX = device# * 2 ; ALL SEGMENT REGISTERS PRESERVED: ; CS,DS,ES,SS must be preserved though call xor dh,dh ! shl dx,1 mov bx,dx ;device # * 2 ;jmps listst listst: ;called from io_poll: ; entry: BX = device# * 2 ; DL = device# ; exit: AL = 0 if not ready ; 0ffh if ready ; BX = device# * 2 ; DL presereved datasouth: push dx xor cx,cx in al,lstpb cmp al,7ch ; datasouth ready jnz par_ret dec cx jmps par_ret par_ret: ; this is a common listst return point mov ax,cx ; mov retcode to ax from cx pop dx ; restore device number ret ; return to caller EJECT ;********************************************************************** io_list: ; modified for people ; entry: CL = character ; DL = device ; exit: character sent ; ALL SEGMENT REGISTERS PRESERVED: ; CS,DS,ES,SS must be preserved though call push cx ! push dx ;save the character and device call poll ;wait for device to be ready pop dx ! pop cx ;device and character ;BX=device# * 2 mov al,cl ;AL = character out lstpa,al ; data out mov al,3 ; out lstpmd,al ; bit set mov al,2 out lstpmd,al ; bit reset ( strobe out ) ret eject dseg lcb_tab rb 0 lcb0 dw 0,0,0,0,0 db 0ffh ;msource ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;