Classic Computer Magazine Archive PROGRAM LISTING: 88-08a/XEGSMGR.M65


��� 
X; XEGSMGR.M65X; BY MATTHEW RATCLIFFX; (c)1988, ANTIC PUBLISHING(EI2>�D:SYSEQU.M65<>�D:IOMAC.LIBFIP"A
XEGS Manager By M. RatcliffAZ4dEKnFx�TXPNTԂ
�RAMTOPj�<�STRBUF;;CASBUF for text                       buffer��PORTB�;;Cart cntrl port��CLRBAK�;;Bkgnd color��LMARGNR;;Left margin��BASICF�;;BASIC ctrl flag��BASIC_ON��BASIC_OFF��DOSID;;An "S" is here��SPARTAFLG
S;;if SpartaDos� X;               is present..��RMARGNS;;Right Margin��TEMP��MASK��RAMPNT�;;RAMPOINTERD�MAXPAG�;;Max page pointer                    for ROM->RAM copy"8�FLAG�;;Copy part1/part2                       flag,:�CASINI;;Vector we will                        steal6�COLDSTD@�CSET�J�WARMSVt�T
�PAGE6^"X; If Self-test selected, checkh$X; first byte here, definition ofr#X; space character. Try to write| X; nonzero value there. If it�#X; changes then we're in RAM O/S�$X; mode. Will crash if attempt to�"X; continue. If RAM-based, tell�X; user & return to DOS.�!X; If ROM, continue with test.��GINTLK�;;Ext. Cart Flag��BOOT	�!X; Good cass boot will give us� X; control via CASINI vector.��COPY��
�IRQEN��
�CRITICB��GRACTL��SDMCTL/
�POKMSK
�NMIEN�&�DMACTL�0
�PRN0 :
D
A�INCORRECT PRN0 CALL!ANX!�@SKPTX]X;b�@TXT=
=l�@SKPTX$>4�@TXTv%>5�@TXT� �PRINTXT��X;�	�BEGIN�= �GRAF0;;GRAFCMD, set new                      RAMTOP, too�Q>;;Black bkgnd.�P�CLRBAK�
 �TITLE�Q�GINTLK�F�INTBAS;;No ext. cart-OK�X;�?!�RRONLY;;Yes-ROM/RAM                           option only!�
�INTBAS� �TOP�#�PRN0 A��۱� Turn ��Π BASIC �A�#�PRN0 A��۲� Turn ���� BASIC �A�#�PRN0 A��۳� Run ��������   �A#�PRN0 A��۴� ROM O/S to RAM  �A#�PRN0 A��۵� RAM O/S to ROM  �A#�PRN0 A��۶� Missile Command �A  �BOT*	 �CRLF4:Q>;;No editing                            prompt line>P�LMARGN;;Fix marginH�BPUT =�PROMPT=R	�KEYINW �GETKEY\5;;Save keyfQ>pP�LMARGNz	 �CRLF�7��KEY1�R>
1;;Cart on?�H�KEY2;;NOPE�X;�9Q�PORTB;;Yes, current                          config?�M>�;;Enable BASIC�
P�PORTB�Q>�;;New RAMTOP�P�RAMTOP� �GRAF0;;Normal screen�Q>�BASIC_ON�P�BASICF�	 �CRLF��PRN0 A�����à�ΠA!�CR5X;�KEY2R>
2;;Cart. off?H�KEY3;;No.X;$
�BASOFF)Q�PORTB;;Yes! Do it!.L>8P�PORTB;;It's off. NowBQ>�;;set new RAMTOPLP�RAMTOPV
 �GRAF0`	 �CRLFjQ>�BASIC_OFFtP�BASICF~�PRN0 A�����à��ƠA�!�CR5;;Back to DOS.�X;��KEY3�R>
3;;Self-test?�
H�KEY4;;No�X;� �BASOFF;;BASIC off first�Q�PORTB;;Enable OS RAM�L>�
P�PORTB�
 �GRAF0�Q�PORTB;; Self-test on.�M>�:P�PORTB;;Now remapped                          to $5000�Q>;;Coldstart flagP�COLDST;;for 'RESET'
X; Reboot after test!PX;�KEY4#R>
4;;ROM O/S -> RAM?(F�GROMRAM-X;2�KEY57R>
5;;RAM O/S -> ROM?<	H�KEY6AX;F	Q�BOOTPM>Z	P�BOOTd!�WARMSViX;n�KEY6s;!�MISLCMD;;Enable Missile                        Commandx	 �GOOF�
!�BEGIN�X;��GROMRAM�
Q�DOSID�R>�SPARTAFLG�H�GOROMSRAM�X;��NORAMOS�Q>�P�LMARGN�	Q�BOOT�M>;;Disk boot OK�	P�BOOT�
 �GRAF0�$�PRN0 A���͠ϯӠ������������A�$�PRN0 A������������Ӡ���塪�A�:�X;
�GOROMSRAM	!�ROMSRAM
X;$X;Copy ROM OS -> RAM then disableX;all interrupts, enable RAM"X;in place of ROM (OS),'X;copy RAM->RAM & enable.,
�RRONLY1Q>6P�LMARGN@	 �CRLFJ
Q�DOSIDTR>�SPARTAFLG^F�NORAMOScX;h)�PRN0 A��������̠�������Š������ԠAr$�PRN0 A�CONVERT ROM OS  RAM ?A|0�PRN0 A�(Type 'Y' or 'N' and press RETURN) A� �GETKEY�R>
Y�F�ROMSRAM�X;�R>
N�	F�QUIT�X;�	 �GOOF�
!�BEGIN�X;��QUIT�
 �GRAF0�!�CR5�X;�	�DRVTX�A�D1:*.FNTA=
��FILENAME�A�D1:FILENAME.EXTA=
=
=
�X; ROM OS to RAM setup��ROMSRAM$>;; Move RAM O/S%�RAMGRLN;; MGR to Page6
�RMOVLPQ�RAMGR9P�PAGE69&201:H�RMOVLP?X;D �PAGE6;; Make RAM O/SN)�PRN0 A� ��͠ϯӠ����������������AX)�PRN0 A� ����������������㡠��Ab	�REDIRg)�PRN0 A� ���������������������Al$�PRN0 A� (1-8, 0=Exit, no load)Av �GETKEY�R>
;; CR also exits�
F�NOFNT�X;�R>
0�
H�DIRIT�X;�	�NOFNT�:�	�DIRIT�R>
9;; Valid drive #?�D�DIRIT2�X;�	 �GOOF�
!�REDIR�X;�
�DIRIT2�R>
1�E�DIRIT3�X;�	 �GOOF�!�REDIR;; Try it again.�X;
�DIRIT3
P�DRVTX
�CLOSE �OPEN ===�DRVTX C*I�DIRIT4/X;4�PRN0 A�Open error.A>
�CLOSE H
!�REDIRMX;R
�DIRIT4W
 �GETFNAME\CfG�DIRIT5kX;p�PRINT =�STRBUF=z!�DIRIT4X;�
�DIRIT5�
�CLOSE ��PRN0 A�Font file to load?A�!�PRN0 A�(������ for new dir)A� �GETKEY�Q�STRBUF�R>
�H�DIRIT6�X;�
!�REDIR�X;�
�DIRIT6� �EDITFNAME��OPEN ===�FILENAME�I�DIRIT7�X;��PRINT =�FILENAME=��PRN0 A�Can't open file�!A	
�CLOSE 	
!�REDIR	X;	
�DIRIT7	�BGET =�CSET=$	
�CLOSE .	�DIRIT7A3	!�PRN0 A�RAM O/S Font loaded.A8	.�PRN0 A�[1] Exit [2] Load different font?AB	 �GETKEYL	R>
1V	H�DIRIT8[	X;`	�CR5e	Q>j		P�TEMPt	
�XTRALFy		 �CRLF~		"�TEMP�	H�XTRALF�	X;�	:�	X;�	
�DIRIT8�	R>
2�	F�DIRIT9�	X;�		 �GOOF�	!�DIRIT7A�	X;�	
�DIRIT9�	
!�REDIR�	X;�	X; Edit strbuf to filename�	X; with defaults�	
�EDITFNAME�	Q�STRBUF;; D: or Dn:?�	R>
:�	>F�COPYASIS;; Yes, no edits                         on front
Q�STRBUF

R>
:

F�COPYASIS
X;
Q>
D;; Set default(
P�FILENAME;; drive spec2

Q�DRVTX<
P�FILENAMEF
Q>
:P
P�FILENAMEZ
$>
d
%>n
	�COPLPs
=Q�STRBUF8;; Move rest                             of fnamex
P�FILENAME8�
R>
�

F�EXTST�
X;�
3�
0�

H�COPLP�
X;�

F�EXTST�
X;�
�COPYASIS�
$>�
%>�

�COPLP1�
Q�STRBUF8�
P�FILENAME8�
R>
�

F�EXTST�
X;�
R>
F�EXTST	X;30"H�COPLP1'X;,	�EXTST1$>6
�EXTST1;Q�FILENAME9@R>
.;; Extender here?JF�GOTEXT;; Yes, done editOX;TR>
^F�ADDEXT;; Add extensioncX;hR>rF�ADDEXTwX;|2�9(>;; Done all                              possible?�H�EXTST1�X;�
�ADDEXT�%>��ADDEXT1�Q�DRVTX8�P�FILENAME9�2�3�)>�H�ADDEXT1�X;�
�GOTEXT�:�X;�X; Execute a GR.0 to restore�X; E: S: and K: handlers�X; after ROM->RAM function.	�GRAF0$>`;;CL.# 6 - ScreenQ>�CCLOSE&P�ICCOM90 �CIO:$>`DQ>�COPN;;OPEN S:NP�ICCOM9XQ>
S;; S: temporarilybP�STRBUF;; on CASBUF pg 4lQ>
:vP�STRBUF�5Q>;;Point to S:                           page 4�P�ICBADR9�Q>;;GRAPHICS 0�P�ICAUX29;;For S: handler�P�ICBADR9;;Rest of S: adr�>Q>;;Flip bit 4 &                         allow READ/WRITE�P�ICAUX19�!�CIO;;Open & return�X;��GOOF�Q>;;Left margin�P�LMARGN�Q>';;Right margin�P�RMARGN�	 �CRLF
�PRN0 A�������Ġ��٠�A
	�GOOF1
$�PRN0 A�PRESS ������ TO RESTARTA
 �GETKEY 
:%
X;*
�GETKEY/
�INPUT =�STRBUF=4
Q�STRBUF>
:C
X;H
�GETFNAMEM
�INPUT =�STRBUF=R
:W
X;\
�PROMPTa
A���堣�������������οAf
�PRINTXTk
&�ICBADR;;Print to #0p
&�TXPNTz
@'�ICBADR;;X-lo byte,                            Y-hi byte.�

'�TXPNT�
%>�
'�ICBLEN�
'�ICBLEN�
�LEN�
Q@�TXPNT7;;Length?�
R>;;ETX-End of text�
F�OUTPUT�
X;�
#�ICBLEN�
	H�MORE�
X;�
#�ICBLEN�
�MORE�
3�
H�LEN;;256 chars max.�
X;�
�OUTPUTQ>;;PUT record$>;;Ch #0
P�ICCOM!�CIOX;$X; Print a blank line.�CRLF3
�PRINT 8:=X;B	�TITLEGQ>LP�LMARGNV	 �CRLF` �TOPj#�PRN0 A����������Ӡ�������At#�PRN0 A������������������A~#�PRN0 A�������������������A�#�PRN0 A����������������堠��A�#�PRN0 A�������̯�Š����������A� �BOT�!�CRLF;;CR and [RETURN]�X;��TOP�#�PRN0 A�����������������������A�:�X;��BOT�#�PRN0 A�����������������������A�:�X;��MISLCMD�%�MISLLEN�$>�&�COLDST��MISLPUT�
Q�MISLCOM9�P�PAGE692
1H�MISLPUTX;
!�PAGE6#X;(�MISLCOM2�==�==�=<�==�==�=	FL=t=�=�==�P	==�==�=�Z=�=)=�=�=d�=�==�=*=n�==�==�=x=�=�=�=�=*�=�=*==�=���=�=�=�=�=�=�=�=�= =R�=�==�==��=�==�==��	=l=�=�=l=��	�=`��MISLLEN�
�MISLCOM�	�RAMGR�>�D:RAMOSDAT.M65��RAMGRLN�
�RAMGR�EI�
	�BEGIN

Back to previous page