Classic Computer Magazine Archive PROGRAM LISTING: 84-11/WINDOWS3.ASM


0100 ;ATASCII TO SCREEN CONVERTER
0110 ;BY DAVE CULBERTSON
0120 ;ANTIC MAGAZINE
0130 ;
0140 ;�������
0150 LOC =   $CB     ;Address of data string.
0160 ;
0170     *=  $0600   ;RELOCATABLE
0180 ;�������������������
0190     PLA         ;GET # OF PARM'S.
0200     PLA         ;GET HI LOC.
0210     STA LOC+1   ;STORE IT.
0220     PLA         ;GET LO LOC.
0230     STA LOC     ;STORE IT.
0240 ;���Ԡ��������Ǡ�����Ӡ���š�
0250 S   LDY #0      ;ZERO POINTER.
0260 B   LDA (LOC),Y ;GET # FROM STRING.
0270     TAX         ;COPY IT INTO 'X'.
0280     CMP #0      ;IS IT END OF STRING?
0290     BEQ F       ;YES, GOTO 'F'.
0300     AND #96     ;MASK BITS 32 & 64.
0310     CMP #0      ;IS IT 3RD GROUP?
0320     BNE C       ;NO, GOTO 'C'.
0330 ;     �������������
0340     TXA         ;RESTORE #.
0350     ORA #64     ;SET BIT 64 HI.
0360     CLC         ;DONE, GOTO 'D'.
0370     BCC D
0380 ; �����ˠ����󠱬�����䠴��
0390 C   CMP #96     ;IS IT 4TH GROUP?
0400     BEQ E       ;YES, GOTO 'E'.
0410     TXA         ;NO, RESTORE #.
0420     AND #64     ;IS BIT 64 HI?
0430     CMP #0
0440     BNE H       ;YES, GOTO 'H'.
0450 ;    �������������
0460     TXA         ;NO, RESTORE #.
0470     EOR #32     ;SET BIT 32 LO.
0480     CLC         ;DONE, GOTO 'D'.
0490     BCC D
0500 ;    �������������
0510 H   TXA         ;RESTORE #.
0520     ORA #32     ;SET BIT 32 HI.
0530     EOR #64     ;SET BIT 64 LO.
0540 ;���̠��������Ġ����Š���Ϡ���Ԡ
0550 D   STA (LOC),Y ;PUT CONVERTED BACK.
0560 E   INY         ;BUMP POINTER +1.
0570     BNE B       ;IF Y<>0 GOTO 'B'
0580     INC LOC+1   ;BUMP LOC 1 PAGE.
0590     CLC 
0600     BCC S       ;GOTO 'S'.
0610 ;���̠���Š
0620 F   RTS 

Back to previous page