Classic Computer Magazine Archive PROGRAM LISTING: 86-09/FAXA.M65


��^4dX;D1:FAXA.M65nX;By Patrick BassxX;(c) 1986, Antic Publishing�X;Included from D:FAX.M65�X;��ADD.W �,�Q�	O>4�P�
Q�	O>5�
P��X;��SUB.W ;Q	S>4"P,
Q6	S>5@
PJTX;^�LEA.W h	Q>5r
P|	Q>4�P��X;��MOVE.B �Q�P��X;��MOVE.W ��MOVE.B =��MOVE.B =��X;
�POKE 	Q>4P&0X;:
�ALSO DPNXX;b�WRITE l$>v�@PLC�Q9�;�S> �P9�0�	I�@PLC��X;��MOVEM �$>��@AA�Q9�P92(>D�@AA *X;4X;----- Constants ------>	�UPH�DOWNR�LEFT\�RIGHT;;Joystick dirsf�PRINTER;;Die Schriberp�DISK;;The diskman!z�WRITE;;Schriben Sie��READ;;Sehen Sie��KEYBOARD;;Eine tapper��BLANK1;;Dlist equates�
�BLANK8p�
�LMS@��MODEFO��JMPWTA��CH�;;where keys sit��PIXSTART;;status values��PIXDRAW��PIXOVER��GHOST,;;BOO!��ORINCOLOR��RANDOM
��IRQEN�;;Hardware�SDMCTL/;;DMA Shadow$�STICK0x;;Stick shadow.�AUDCTL�;;Audio Control8�POKMSK;;IRQEN shadowB�COLOR0�;;soft shadowsL�COLOR1�COLOR0V�COLOR2�COLOR0`�COLOR3�COLOR0j�COLOR4�COLOR0t�ATRACTM;;It's atractive~�PORTA�;;Outside World.��NE.PORT�;;...in a storm.��AUDF1�;;Hard sound.�
�AUDC1Ҧ
�AUDF2Ұ
�AUDC2Һ�SDLSTL0;;Dlist shadow��VTIMR4;;Timer4 shadow��STIMER	�;;Hard time.��ATARIEOL
��EOL
;;ATARI EOL�
�ESC��CR
;;Honest CRX;
�TOTAL.COLUMNS�;;512�TIMER.DELAYQ;;06F2�BYTES.PER.LINE@(�NUM.SCAN.LINES�2�SCAN.LINES.ONSCREEN�<�BPL�BYTES.PER.LINEF�NSL�NUM.SCAN.LINESP�SLO�SCAN.LINES.ONSCREENZ�SCREEN8d�SCRSIZE�NSL�BPLn!�SCREENEND�SCREEN�SCRSIZEx$�PRINTSTART�SCREEN�SCRSIZE�BPL�X;� X;----- Reserved Memory -----����POINTER.A
��COUNTER.A
��POINTER.B
��COUNTER.B
��POINTER.C
��COUNTER.C
��POINTER.D
��COUNTER.D
�X;� �DECIMAL	==
�XINDEX
�YINDEX"�OREDCOLOR,�INVMASK;;Inverso-matic6�HIGHFLAG@�TEMP;;Used somewhereJ�MLADDR	;;ModeLine AddrT�DISPLAY	;;From the top^�HORIZ.COUNTh�VERT.COUNTr�HORIZ.LIMIT�BPL(|�VERT.LIMIT���STICK;;Shadow-our-own�X;��PSTARTADR	��PRINTROW	��PRINTCOL	�
�BUFFER�	========�	========�!�IPMESS�ESC=A�@A=�ESC=A�AA=��PPMESS�ESC=A�KA�X;��CURRROW	��NUMROW	�NUM.SCAN.LINES�CURRCOL	�NUMCOL	�TOTAL.COLUMNS�COLMASK�&�COLSKIP0�SKIPCOUNT:�STARTADR	�SCREEND�SPEEDADJN�ADJCOUNTX
�STATUSb�MICROM	�
l�TWOPER	�TIMER.DELAYv�ONEPER	�;;$0EA9��MICROROW	A��TWOLINEROW	�TOTAL.COLUMNS��ONELINEROW	�TOTAL.COLUMNS��TIMERCOUNT	�TIMER.DELAY�X;��ST.LINE�	A�K A�A�   <    >A�A�   -    +A�
�TEXT.LINE�!=========�!=========�!=========X;�FILENAMEA�D:WEFAX.A �FILENAME.X*A� A=�ATARIEOL=4
�MFILENAME>A�D:PICTUREA=�ATARIEOL=H�TYPEMESSRA� (F)ULL OR (M)ICRO? A\�SAVINGMESSfA�SAVING WEFAX PICTUREAp�LOADERMESSzA�  LOADING PICTURE   A��SAVEMESS�A� SAVE WEFAX 1 OR 2? A��LOADMESS�A� LOAD WEFAX 1 OR 2? A�
�BLANKMESS�A�                    A�X;�X;-------------------------�	�DLIST��BLANK8=�BLANK8=�BLANK8�	�SUBDL�
�SLO ��BLANK1	�LMS		�TEXT.LINE	X;$	
�JMPWT.	
	�DLIST8	X;B	X;-------------------------L	(V	
�STARTCODE`	-j	=t	$>�~	B�	�LEA.W �PLOTDATA=�VTIMR4�	.�		!�MAIN�	X;�	"X;- - - - - - - - - - - - - - -�	�BUILD.LIST�	�LEA.W �SUBDL=�POINTER.A�	�MOVE.W �DISPLAY=�MLADDR�	$>�SCAN.LINES.ONSCREEN�	�BL1�	 �BUILD.MODE.LINE�	0
H�BL1

X;
:
X;(
X;-------------------------2
�BUILD.MODE.LINE<
%>F
Q>�MODEFP
P@�POINTER.A7Z
3d
Q�MLADDRn
P@�POINTER.A7x
3�
Q�MLADDR�
P@�POINTER.A7�
�ADD.W �POINTER.A=�
�ADD.W �MLADDR=�BPL�
:�
X;�
X;-------------------------�

�SCROLL�
Q�STICK0�
N>�

P�STICK�
H�TRY.RIGHT�
:X;
�TRY.RIGHTP�ATRACT"M>�RIGHT,
F�TRY.LEFT6X;@Q�HORIZ.COUNTJR�HORIZ.LIMITT
F�TRY.LEFT^X;h#�HORIZ.COUNTr�ADD.W �DISPLAY=|�TRY.LEFT�
Q�STICK�
M>�LEFT�F�TRY.UP�X;�Q�HORIZ.COUNT�F�TRY.UP�X;�"�HORIZ.COUNT��SUB.W �DISPLAY=�
�TRY.UP�
Q�STICK�M>�UP�
F�TRY.DOWNX;Q�VERT.COUNT
F�TRY.DOWN&X;0"�VERT.COUNT:�SUB.W �DISPLAY=�BPLD�TRY.DOWNN
Q�STICKX
M>�DOWNb
F�FIXDLlX;vQ�VERT.COUNT�R�VERT.LIMIT�
F�FIXDL�X;�#�VERT.COUNT��ADD.W �DISPLAY=�BPL�	�FIXDL� �BUILD.LIST�:�X;�X;-------------------------��CLEAR.SCREEN��POKE �INVMASK=��LEA.W �SCREEN=�POINTER.B
�LEA.W �SCRSIZE=�COUNTER.B
�CLS1
%> 
C*
P@�POINTER.B74
�ADD.W �POINTER.B=>
�SUB.W �COUNTER.B=H
	E�CLS1R
X;\
:f
X;p
X;-------------------------z
�INV.SCREEN�
�POKE �HIGHFLAG=�
�LEA.W �SCREEN=�POINTER.B�
�LEA.W �SCRSIZE=�COUNTER.B�
�INV1�
%>�
Q@�POINTER.B7�
N>��
P@�POINTER.B7�
�ADD.W �POINTER.B=�
X;�

Q�HIGHFLAG�
	H�INV2�
X;Q�POINTER.BR�POINTER.C	D�INV2$X;.Q�POINTER.B8R�POINTER.CB	D�INV2LX;V
#�HIGHFLAG`Q�INVMASKjN>tP�INVMASK~�INV2��SUB.W �COUNTER.B=�	E�INV1�X;�:�X;�X;-------------------------��INITFAXMAP��LEA.W =�CURRROW��LEA.W =�CURRCOL��LEA.W �SCREEN=�POINTER.C��LEA.W �SCREEN=�STARTADR��MOVE.B �COLSKIP=�SKIPCOUNT�POKE �STATUS=�PIXDRAW
�POKE �COLMASK=��POKE �ADJCOUNT=:(X;2X;-------------------------<�GETPOINTF
Q�PORTAP	I�PLT0ZX;dQ>n
�GHOSTx�PLT0�Q>�N�INVMASK�X;�6�%>�Q�COLMASK�N>��M@�POINTER.C7�P@�POINTER.C7�8�	F�PLT1�X;�Q�COLMASKL@�POINTER.C7P@�POINTER.C7�PLT1"
Q�ADJCOUNT,F�PROCESS.POINT6X;@
"�ADJCOUNTJ:TX;^X;- - - - - - - - - - - - -h�PROCESS.POINTr�ADD.W �CURRCOL=|Q�CURRCOL�R�NUMCOL�	D�PRO1�X;�Q�CURRCOL�R�NUMCOL�	E�PRO2��PRO1�V�COLMASK�
H�PRO1X�X;��POKE �COLMASK=���MOVE.B �SPEEDADJ=�ADJCOUNT��ADD.W �POINTER.C=	�PRO1X:X;- - - - - - - - - - - - -&�PRO20�POKE �COLMASK=�:�MOVE.B �SPEEDADJ=�ADJCOUNTD�LEA.W =�CURRCOLNQ�SKIPCOUNTX	F�PRO3bX;l �MOVE.W �STARTADR=�POINTER.Cv"�SKIPCOUNT�:�X;�X;- - - - - - - - - - - - -��PRO3��MOVE.B �COLSKIP=�SKIPCOUNT��ADD.W �CURRROW=��ADD.W �STARTADR=�BPL� �MOVE.W �STARTADR=�POINTER.C�Q�CURRROW�R�NUMROW�	D�PRO4�X;�Q�CURRROWR�NUMROW	D�PRO4X; �POKE �STATUS=�PIXOVER*�PRO44:>X;HX;--------------------------R�START.TIMER\�POKE �AUDCTL=Pf�POKE �AUDC1=�p�ALSO �AUDC2z�MOVE.B �TIMERCOUNT=�AUDF1�!�MOVE.B �TIMERCOUNT=�AUDF2��POKE �POKMSK=˜�ALSO �IRQEN�:�X;�X;--------------------------��STOP.TIMER��POKE �STATUS=�PIXOVER��POKE �POKMSK=���ALSO �IRQEN�:�X;�X;--------------------------�PLOTDATAA5$C.58$�STATUSB
F�PLOTEXITLX;V
(>�PIXOVER`
F�PLOTEXITjX;t(>�PIXSTART~H�PLOTFAXMAP�X;� �INITFAXMAP��PLOTFAXMAP�
 �GETPOINT��PLOTEXIT�7�?�7�>�7�9�X;X;--------------------------

�PRINTBYTEP�BUFFER�BPUT �PRINTER=�BUFFER=(:2X;<X;--------------------------F�PRINTFAXMAPP"�OPEN �PRINTER=�WRITE==A�P:AZ�BPUT �PRINTER=�IPMESS=d!�LEA.W �PRINTSTART=�PSTARTADRn�LEA.W �BPL=�PRINTCOLx�PL1� �PRINTALINE��ADD.W �PSTARTADR=��SUB.W �PRINTCOL=�E�PL1�X;��CLOSE �PRINTER�:�X;�X;--------------------------��PRINTALINE��BPUT �PRINTER=�PPMESS=��BPUT �PRINTER=�NUMROW=��MOVE.W �NUMROW=�PRINTROW!�MOVE.W �PSTARTADR=�POINTER.D�PLP1%>"Q@�POINTER.D7, �PRINTBYTE6�SUB.W �POINTER.D=�BPL@�SUB.W �PRINTROW=J
Q�PRINTROWTL�PRINTROW^	H�PLP1hX;rQ>�CR| �PRINTBYTE�:�X;�X;--------------------------��INIT.SCREEN��POKE �SDMCTL=� �CLEAR.SCREEN��POKE �HORIZ.COUNT=��ALSO �VERT.COUNT��LEA.W �SCREEN=�DISPLAY� �BUILD.LIST��LEA.W �DLIST=�SDLSTL��POKE �COLOR0=��POKE �COLOR1=�ALSO �COLOR4�POKE �COLOR2=
�POKE �COLOR3=4&�POKE �SDMCTL="0::X;DX;--------------------------N�DECIMALIZEX�MOVE.W �DECIMAL=�COUNTER.Db�LEA.W =�DECIMALlQ�COUNTER.DvL�COUNTER.D�
F�DECIX�X;��SUB.W �COUNTER.D=�	�DECI1�<��ADD.W �DECIMAL=�-��SUB.W �COUNTER.D=�
E�DECI1�	�DECIX�Q�DECIMAL�5�Q�DECIMAL �DEC.TO.ASCII'�DECIMAL&�DECIMAL 7* �DEC.TO.ASCII4'�DECIMAL>&�DECIMALH:RX;\"X;- - - - - - - - - - - - - - -f�DEC.TO.ASCIIp5zM>�V?�V?�V?�V?� �CHROUT�?�7�M>�
�CHROUT�,�O>0�L>�ORINCOLOR�>X;:X;$X;--------------------------.�UPDATE.STATS8�LEA.W =�DECIMALB�MOVE.B �COLSKIP=�DECIMALL �DECIMALIZEV#�MOVE.B �DECIMAL=�ST.LINE`X;j�MOVE.W �NUMCOL=�DECIMALt �DECIMALIZE~"�MOVEM =�DECIMAL=�ST.LINE�X;� �MOVE.W �TIMERCOUNT=�DECIMAL� �DECIMALIZE�"�MOVEM =�DECIMAL=�ST.LINE�X;��WRITE �ST.LINE=�TEXT.LINE�:�X;�X;--------------------------��KEYBUFF�	=======��KEYTABLEA�PA=A�AA=A�RA=A�KA
A�<A=A�>A=A�+A=A�-AA�1A=A�2A=A�3A=A�IAA�CA=A�LA=A�SA(�LENKEYTABLE
�KEYTABLE2X;<�KEYJUMPTABLEF	�PRINT.A.FAXMAPP	�ADJUST.SYNCZ
	�RESETd	�CHANGE.SKIPn	�LESS.COLUMNSx	�MORE.COLUMNS�	�MORE.TIME�	�LESS.TIME�	�SET1LINESEC�	�SET2LINESEC�	�SETMICROMODE�	�INV.SCREEN�	�CLEAR.SCREEN�	�LOAD.PIX�	�SAVE.PIX�X;�X;--------------------------��MAIN� �INIT.SCREEN �UPDATE.STATS"�OPEN �KEYBOARD=�READ==A�K:A�POKE �STATUS=�PIXOVER"	�MAIN1, �SCROLL6Q�CH@R>�J
F�MAIN1TX;^�BGET �KEYBOARD=�KEYBUFF=hQ�KEYBUFFr$>�LENKEYTABLE|	�MAIN2�R�KEYTABLE9�
F�MAIN3�X;�0�
I�MAIN2�X;�
!�MAIN1�X;- - - - - - - - - - - - -�	�MAIN3� �PERFORM.ROUTINE�
!�MAIN1�X;�X;--------------------------�PERFORM.ROUTINEAT?&>0Q�KEYJUMPTABLE9:5DQ�KEYJUMPTABLE9N5X:bX;lX;--------------------------v�PRINT.A.FAXMAP��POKE �STATUS=�PIXOVER� �STOP.TIMER�!�PRINTFAXMAP�X;�X;--------------------------��ADJUST.SYNC��POKE �ADJCOUNT=�:�X;�X;--------------------------�	�RESET�Q�STATUS�
R>�PIXDRAWH�GETFAXMAPX;Q�CURRCOL L�CURRCOL*
H�RESET4X;>!�INITFAXMAPHX;RX;--------------------------\
�GETFAXMAPf�POKE �STATUS=�PIXSTARTp �START.TIMERz:�X;�X;--------------------------��CHANGE.SKIP�#�COLSKIP�Q�COLSKIP�R>
�	D�CS11�X;��POKE �COLSKIP=��CS11�!�UPDATE.STATS�X;�X;--------------------------�LESS.COLUMNS�SUB.W �NUMCOL=!�UPDATE.STATS$X;.X;--------------------------8�MORE.COLUMNSB�ADD.W �NUMCOL=L!�UPDATE.STATSVX;`X;--------------------------j
�LESS.TIMEt�SUB.W �TIMERCOUNT=~ �UPDATE.STATS�!�START.TIMER�X;�X;--------------------------�
�MORE.TIME��ADD.W �TIMERCOUNT=� �UPDATE.STATS�!�START.TIMER�X;�X;--------------------------��SET1LINESEC��MOVE.W �ONEPER=�TIMERCOUNT��MOVE.W �ONELINEROW=�NUMCOL �UPDATE.STATS
!�START.TIMERX;X;--------------------------(�SET2LINESEC2�MOVE.W �TWOPER=�TIMERCOUNT<�MOVE.W �TWOLINEROW=�NUMCOLF �UPDATE.STATSP!�START.TIMERZX;dX;--------------------------n�SETMICROMODEx�MOVE.W �MICROM=�TIMERCOUNT��MOVE.W �MICROROW=�NUMCOL� �UPDATE.STATS�!�START.TIMER�X;�X;--------------------------��SAVE.PIX� �STOP.TIMER��WRITE �TYPEMESS=�TEXT.LINE�X;��BGET �KEYBOARD=�KEYBUFF=�Q�KEYBUFF�R>
M�H�SP3X;!�SAVEMICRO�SP3"R>
F,H�SP46X;@
!�SAVEFULLJ�SP4T!�UPDATE.STATS^X;h"X;-----------------------------r
�SAVEMICRO|!�WRITE �SAVINGMESS=�TEXT.LINE� �OPEN �DISK===�MFILENAME�	I�SAM0�X;��CLOSE �DISK�!�UPDATE.STATS� X;- - - - - - - - - - - - - -��SAM0� �MOVE.W �SUBDL=�POINTER.A�$>���SAM1�%>�&�XINDEX��SAM2 Q@�POINTER.A7 '�YINDEX N>�& P�KEYBUFF0 �BPUT �DISK=�KEYBUFF=: %�YINDEXD 3N )>(X 	D�SAM2b X;l �ADD.W �POINTER.A=�BPLv $�XINDEX� 0� 	H�SAM1� X;� �MOVE.B �COLOR4=�KEYBUFF� �MOVE.B �COLOR0=�KEYBUFF� �MOVE.B �COLOR1=�KEYBUFF� �MOVE.B �COLOR2=�KEYBUFF� �BPUT �DISK=�KEYBUFF=� X;� �CLOSE �DISK� !�UPDATE.STATS� X;�  X;---------------------------!�SAVEFULL!�WRITE �SAVEMESS=�TEXT.LINE!X; !�BGET �KEYBOARD=�KEYBUFF=*!Q�KEYBUFF4!R>
1>!	F�SAF0H!X;R!R>
2\!
H�SAVEFULLf!�SAF0p! �MOVE.B �KEYBUFF=�FILENAME.Xz!X;�!#�OPEN �DISK=�WRITE==�FILENAME�!	I�SAF2�!X;�!�CLOSE �DISK�!!�UPDATE.STATS�!X;�! X;- - - - - - - - - - - - - -�!�SAF2�!!�WRITE �SAVINGMESS=�TEXT.LINE�! �BPUT �DISK=�SCREEN=�SCRSIZE�!�CLOSE �DISK�!!�UPDATE.STATS�!X;""X;-----------------------------"�LOAD.PIX" �STOP.TIMER$"�WRITE �LOADMESS=�TEXT.LINE."X;8"�BGET �KEYBOARD=�KEYBUFF=B"Q�KEYBUFFL"R>
1V"	F�LDP0`"X;j"R>
2t"	F�LDP0~"X;�"!�UPDATE.STATS�"X;�" X;- - - - - - - - - - - - - -�"�LDP0�" �MOVE.B �KEYBUFF=�FILENAME.X�"X;�""�OPEN �DISK=�READ==�FILENAME�"	I�LPX2�"X;�" �WRITE �BLANKMESS=�TEXT.LINE�"�CLOSE �DISK�"!�UPDATE.STATS#X;
# X;- - - - - - - - - - - - - -#�LPX2#!�WRITE �LOADERMESS=�TEXT.LINE(# �BGET �DISK=�SCREEN=�SCRSIZE2#�CLOSE �DISK<#!�UPDATE.STATS

Back to previous page