; PASS.COM
; Compile tasm pass.asm
;         tlink /t pass.obj

.286
CODE SEGMENT
ASSUME CS:CODE
ORG 100H
MAIN:
   MOV   AL,37H
   XOR   DI,DI
   MOV   DX,71H
E1:
   OUT   70H,AL
   INSB
   INC   AL
   CMP   AL,3EH
   JB   E1
   AND    BYTE PTR DS:[0000H],0F0H
   XOR   DI,DI


E0:
   XOR   CX,CX
   MOV   AL,DS:[DI]
   MOV   AH,DS:[DI+1]

   CMP   AH,0
   JE    KONIEC

DECOD:
   TEST   AL,0C3H
   JP   DALEJ
   STC
DALEJ:   RCR   AL,1
   INC   CX
   CMP   AL,AH
   JNE   DECOD
   CALL   WRITE

   INC   DI
   CMP   DI,6
   JB   E0


KONIEC:   MOV   AX,4C00H
   INT   21H


WRITE PROC
   MOV   AH,0EH
   MOV   AL,CL
   MOV   BX,0007H
   INT   10H
RET
ENDP

CODE ENDS
END MAIN
