@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% } DD˙`  }J)Lr J  ((  p L ()   J }L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉ } ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G } HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G } C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK }.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`񣩀GBJ ~DEHI B V0dV !}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh "}DEL8HI4 0 HI,0 0  9 .G VLO #},0 L4*IJ`llD1:*.RUNN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI $} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI %} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  - '}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH (}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } )h n# J KI  & a&$E˩̩˙iȱi5)$*}` >ɛ(`HHH7ͩЍ&ud˩ [)ـȄαHȱH`"1ȱ$+}iL="Щ.Ȅ̈́Ω" U˩L ܩeͅ$%"h0hh(` @ '`XXFIND/@&%/%DI6.!cDEL DELET q.$,}!eLOC u.!eUN UNLOC y.!cRE RENAM }KIL .!eE ENTE .!eLO LOA .!eRUN!Z.!cS SAV .!cLI LIST!ZL LIS$-}%.!eBL BLOA&HEL&FORMA%.!cM MOV#WDO$D1:*.* R110HH %L# g"ѩ}$.}HH( % V |" i) ƅ˩څ˩̥HH % L Зȑˈȱ$/}ȑˠ) JJJJi0ȥ)i0JƩ L - L $hhL΢ ͙8ΨeHiH %hhL#$0}`!б#Э$Щ V%0L ЖL&J K Lt Έ)0 ȱHȱH`͈ͤ ` $L&$1} 3!ـȩ:ـ/ 1%  D  :` ͌ `Ω ЀХ$2}d00]:Y8 8 0  HH8X˥Y̠( =" =" hhL&爭)$3} ѩ ,0 3! =" -". G" ;" -"hh˩L  T" G"`e˅ː`H h`H****)h)c"` @$4}`XiYi` # `( #( ~# #( =" ~# # #L# ="8$5} #$( # /# #( ~# # # # ="$( #( # /#'X+X` D#` # D#` ~# ݀$6}0 ( #`( # ;"`˝``˭`˭`H# h,A0L@L4h$7} L - HHB8名呍 %|ɈЩIH Ω1ف.I&&  > H$$8}Ω1iHH %0HH B %0Т&  LE: $H$H %0D1:DOS.SYS`HHͩ?$9}ȩ % H%H %H%H %ЩϢ&  YФͩ `K:&˩&̠ #Р $ ~#Р $L' $:}L͠,oـHDH:HH hHiHDiHE % B Vۢ&  hhh,$;}`BJ IHhhhEhDHHLV eΝDiE͹~/͹NΞͩ L$<} L#&  Lˆ̥˦ ȱ(ɛ(`?' a&L DISK DRIVE 1ARE YOU SURE??INSERT DISK2;HIT ANY KEY (S=TO SC$=}REEN)OUT OF RAM ALREADY EXISTSBAD LOAD FILEDOS 2.5MDISKIOFUNCTION KEYSInstalledType HELP for commands } $>} click rate w/verify boot $?} DIR(n) RUND .RFORMAT LOCK .LWDOS $@} UNLOCK UN. .ULISTD LI. .X RENAME RE. .NSAVE S. .S DELETE DEL. .DENTER E. .E BLOAD BL. .BL$A}OAD LO. .L MOVE M. .M.R9 runs #9 etc. To use DOS type KILL.Reboot to restore DISKIO. $B}.H k)йl)ѠhH hHhO&\&L 5$$%%Y&j&8## $$$%%%5)LZ)l 2l$C}llllll3l5l0ll[ [  `  L^qK$D}Ih@0 ܮyWyWЩPyɩ0LwLL$%&L,+,-L$E}?`ܮyWyWЩPyɩ0LwLL$%&L,+,-L$L)l 2lllllll3l5l0ll [  ` (G} L^q2lllllll3l5l0ll [  ` (GIh@0 ܮyWyWЩPyɩ0LwL$&L +-L(L;pzH,I}`ph@0 ܮyWyWЩPyɩ0LwL$&L +-L(L;pzH, KIh@0 ܮyWyWЩPyɩ0LwL$&L+-L,L?pzL0s5))Ih@0 ܮyWyWЩPyɩ0LwL5)$&LD)+-La)Lt)pz)4L}`ph@0 ܮyWyWЩPyɩ0LwL5)$&LD)+-La)Lt)pz)4 ;;;SOFTKEYS;;This program intercepts the;keyboard interrupt routine and;checks the [OPTION] key.;If the [OPTION] key i8N}s pressed the;routine gets the CIO key which;caused the interrupt and jumps to a;vector table to perform a function;;EQU8O}ATES;GLBABS = $02E0PAGE4 = $0400DOSINI = $0CVKEYBD = $0208MEMLO = $02E7CONSOL = $D01FKBCODE8P} = $D209OPTION = $04K0 = $32K1 = $1FK2 = $1EK3 = $1AK4 = $18K5 =8Q} $1DK6 = $1BK7 = $33K8 = $35K9 = $30; *= PAGE4;;;Make room for exit vecto8R}r;EXIT *= *+2;;DOS initialization jump vector;INIDOS JMP $00 modifyed by; cold start;;8S}KBI routine: Check for [OPTION][x];then jump to vector table if;pressed.;CHECK LDA CONSOL AND #OPTION 8T} BEQ TABLE;;[OPTION] not pressed, jump through;exit vector.; JMP (EXIT);;[OPTION] has been pressed, get CIO;8U}key and check jump table;TABLE LDA KBCODE CMP #K0 BNE T1J0 JMP (EXIT)T1 CMP #K1 8V} BNE T2J1 JMP (EXIT)T2 CMP #K2 BNE T3J2 JMP (EXIT)T3 CMP #K3 BNE T4J3 JM8W}P (EXIT)T4 CMP #K4 BNE T5J4 JMP (EXIT)T5 CMP #K5 BNE T6J5 JMP (EXIT)T6 C8X}MP #K6 BNE T7J6 JMP (EXIT)T7 CMP #K7 BNE T8J7 JMP (EXIT)T8 CMP #K8 BNE8Y} T9J8 JMP (EXIT)T9 CMP #K9 BNE T0J9 JMP (EXIT)T0 JMP (EXIT);;WARM START;;Initialize 8Z}DOS;WARM JSR INIDOS;;Point DOSINI back to warm start;WARM1 LDX # WARM STX DOSINI8[} STY DOSINI+1;;intercept keyboard interrupt; LDX # CHECK STX VKEYBD 8\} STY VKEYBD+1;;ENDWARM RTS ;;;COLD START;;Steal DOSINI;COLD LDX DOSINI LDY DOSINI+1 STX I8]}NIDOS+1 STY INIDOS+2;;Make vector to release keyboard;interrupt; LDX VKEYBD LDY VKEYBD+1 8^} STX EXIT STY EXIT+1; JMP WARM1;;Initialization tailer; *= GLBABS+2 .WORD COLD;8} ; ;FLIB ; ;Function library <`} ;for SOFTKEYS ; ;Equates ; ENDLIB 0474 0474 8EE702 STX MEMLO 0477 0477 8CE802 STY MEMLO+1 047A 047A 60 RT<}S ; ;Initialization ;tailer ; 0<}47B 047B *= GLBABS+2 02E2 02E2 7004 .WORD ENDWARM ; ; 0<b;;FLIB;;Function library for SOFTKEYS;;Equates;DOSINI = $0CMEMLO = $02E7ENDWARM = $0470PAGE6 = $06@}00DOSEND = $1CFCDISKIOEND = $2934GLBABS = $02E0KRPDEL = $02D9KEYREP = $02DANOCLIK = $02DBSHORTD @} = $14FSTRTE = $03LONGD = $30SLORTE = $06NOKEY = $FFCH = $02FCVERIFY = $57NOVER = @} $50DVERIF = $0779COLDSV = $E477RTCLOK = $12KCTRLX = $96J0 = $0416J1 = $041DJ2 =@} $0424J3 = $042BJ4 = $0432J5 = $0439J6 = $0440J7 = $0447J8 = $044EJ9@} = $0455;;Use PAGE6, DOSEND or DISKIOEND for;start address; *= DOSEND;;Toggle key click;CLICK LD@}A NOCLIK EOR #$01 STA NOCLIKEXXIT LDA #NOKEY STA CH PLA RTI ;;Toggle key @}repeat delay and rate;from normal to fast or back;REPEAT LDA #LONGD CMP KRPDEL BEQ FASTSLOW STA K@}RPDEL LDA #SLORTE STA KEYREP BNE EXXITFAST LDA #SHORTD STA KRPDEL LDA #FSTR@}TE STA KEYREP BNE EXXIT;;Toggle disk write-verify.;DISK LDX DVERIF LDA #VERIFY ST@}A DVERIF CPX #VERIFY BNE EXXIT LDA #NOVER STA DVERIF BNE EXXIT;;Cold start;;@}Initialization for this routine;changes SOFTKEYS to look for;[CONTROL][X] instead of [0].;COLDST LDA #0 STA RT@}CLOK+2DELAY LDA RTCLOK+2 CMP #$30 BNE DELAY JMP COLDSVENDLIB;;Function library initializati@}on; *= J1 JMP CLICK; *= J2 JMP REPEAT; *= J3 JMP DISK; @}*= J0-3 .BYTE KCTRLX *= J0 JMP COLDST;;Protect from system; *= ENDWARM LDX@} # ENDLIB STX MEMLO STY MEMLO+1 RTS ;;Initialization tailer; *@}= GLBABS+2 .WORD ENDWARM; STX MEMLO STY MEMLO+1 RTS ;;Initialization tailer; *@%SOFTKEYSFunction Keys for Atari 8-bitsBy Bob DuHamelWouldn't it be nice if the Atari 8-bit computer had programmableD} function keys, such as on IBM and the ST. I never really missed them myself until I got an 800XL. I like being able to turD}n off the key click and speed-up the cursor but I don't like having to do several pokes before I start working or after pressD}ing [RESET]. If you're not in BASIC you can't make the changes anyway. For some time I have been thinking about combining tD}he [OPTION] key with the number keys to make 10 or more programmable keys. I finally got around to doing it.Now, after I bD}oot a disk with my soft key routine, I press [OPTION][1] to turn the key click off and on, [OPTION][2] to change the cursor sD}peed from slow to fast and back, [OPTION][3] to turn the disk write-verify on and off (with DOS 2), and [OPTION][CONTROL][X] D}to do a cold start (reboot). When I do a cold start I have about 1/2 second to release the [OPTION] key if I want BASIC enabD}led. The routine is RESET proof and works with most programs I have tried it with.ABOUT THE PROGRAMI decided to design tD}he routine so it can be thought of much as a regular part of the computer. I assigned a permanent location for the main routD}ine, SOFTKEYS, in memory. It intercepts the keyboard interrupt routine and checks to see if the [OPTION] key is pressed. IfD} [OPTION] is pressed SOFTKEYS checks to see if one of the number keys has been pressed. If so, that key is turned over to thD}e keyboard interrupt routine for processing. In other words, SOFTKEYS does absolutely nothing by itself. Display list interD}rupts work much the same way. The second program, FLIB, is a library of functions. The library initializes by changing the D}jump vectors in SOFTKEYS to point to the functions in the library. By designing the routine this way, SOFTKEYS can be loadedD} by itself and modified by another program to point to it's routines instead.I needed a safe place to put the SOFTKEYS routD}ine. After some thought I decided to use the cassette buffer which starts at $3FD and ends at $47F (decimal 1021 to 1151). D}Addresses $3FD to $3FF are cleared when RESET is pressed so the routine starts at $400 (1024). This area is virtually unusedD} by disk drive owners. Of course you can't use a cassette recorder for data with this routine in the cassette buffer. If byD} chance you need to use a cassette recorder after this routine is loaded, first type POKE 520,PEEK(1024):POKE 521,PEEK(1025).D} This will take SOFTKEYS out of the keyboard interrupt routine. It will also allow you to use the DOS utilities, DUP.SYS, iD}f you are using an incompatible function library file. DISKIO's KILL command will also disable SOFTKEYS.Three function libD}rary files are provided on this disk. They are FLIB.EXE, FLIB2.EXE and FLIB3.EXE. FLIB.EXE starts at $2935 (10549) which isD} where DISKIO ends. This library ends at $2981 (10625). FLIB2.EXE starts at $1CFC (which is where DOS 2 ends) and ends at $D}1D48 (7420 to 7496). FLIB3.EXE uses page 6 and starts at $600 and ends at $64B (1536 to 1611). The FLIB file you choose wilD}l depend on whether you are using DISKIO and whether you want to use page 6 ($0600 to $06FF). The library has only four funcD}tions leaving 7 you can add yourself.There are two ways to put together an AUTORUN.SYS file to install SOFTKEYS. The standD}ard way is to go to the DOS utilities (by typing DOS in BASIC). From the utilities you can append the desired FLIB file to SD}OFTKEYS. To append the files: 15First copy SOFTKEYS.EXE and the desired FLIB file to the disk you want to boot from;NextD} use the copy commad (C) to append the FLIB file to SOFTKEYS using the following syntax; FLIB.EXE,SOFTKEYS.EXE/A (Don'tD} forget the "/A")Finally, delete the FLIB file (it is now appended to SOFTKEYS) and rename SOFTKEYS.EXE to AUTORUN.SYS. 10D}If you want to use SOFTKEYS with DISKIO you can append above finished SOFTKEYS file to the DISKIO AUTORUN.SYS file instead D}of renaming SOFTKEYS. Use FLIB.EXE or FLIB3.EXE with DISKIO. FLIB2.EXE will write over part of DISKIO.Another way to appeD}nd the files is to load them into a buffer in the order you want them appended. You can do this with FASTIO from the Atari BD}ASIC Power Pack or with some word processors. You then resave the complete file under the name AUTORUN.SYS. To do this withD} FASTIO: 15Be sure that LNBUF in line 30196 is large ennogh to hold all the files;Also be sure that BUFF$ is empty by eitD}her typing RUN or BUFF$="";Type GOSUB RDFILE and D:(filename 1);Type GOSUB RDFILE and D:(filename 2) etc. 10After all tD}he files are appended: 15Type GOSUB WRFILE and D:AUTORUN.SYS 10To append the files with ATARIWRITER: 15Type [L] then fiD}lename 1;Type [E] then move the cursor to the end of the file;Type [OPTION][L] and filename 2;To load any other files, D}move the cursor to the end of the file again before typing [OPTION][L];Type [ESC] then [S] (IMPORTANT! use [CONTROL][S] witD}h ATARIWRITER PLUS);Type AUTORUN.SYS. 10CUSTOMIZING SOFT KEYSThe soft key routine has ten jump vectors and ten check bD}ytes starting at $0412 (decimal 1042). The following table shows where each check byte and jump vector is and which key it iD}s used for.Soft Key Jump Table 15KEY Check byte Jump Vector hex dec hex dec0 $0413 1043 $0D}416 10461 $041F 1050 $041D 10532 $0421 1057 $0424 10603 $0428 1064 $042B 10674 $042F 1071 D} $0432 10745 $0436 1078 $0439 10816 $043D 1085 $0440 10887 $0444 1092 $0477 10958 $044B 1099D} $044E 11029 $0452 1106 $0455 1109Table exit vector $0458 1112 10The jump vectors are indirect jumps throuD}gh $0400. They must be changed to direct jumps to your routine. See the FLIB.SRS file for an example of how this is done. D}If you want to pass the key on to the keyboard handler after your routine is finished with it, end your routine with "JMP ($0D}400)". This is an indirect jump through $0400 to the keyboard interrupt routine. If you want to keep your key from the handD}ler, store the number $FF (255) in $02FC (764), then use PLA, RTI to exit the routine. The table exit vector could be used tD}o jump to another table to check for more keys. Remember that the functions become part of the keyboard interrupt routine anD}d should usually be kept short. A good type of routine would set a flag byte that another program could check later.You caD}n also alter the jump table in BASIC. Change the table with a routine like the following. This example assumes that a machiD}ne language routine starts at $600. 76 is the decimal code for a direct jump. 1000 REM Point OPTION 4 to $600 1010 J4=107D}4:JMP=76 1020 POKE J4,JMP:POKE J4+1,0:POKE J4+2,6It is best to have the machine language routine somewhere secure such as D}$600 to $6FF (1536 to 1791). If your machine language routine is in a basic string, it may get moved when the program is stoD}pped. This can cause disasterous results if you press a soft key when the program isn't running.You may have noticed that D}FLIB changes the 0 key to CONTROL X. You can do this too. Just change the check byte for the key you want to replace. The D}SOFTKEYS is usually appended to the end of any AUTORUN.SYS file it is loaded with. In the case of TURBO-BASIC, SOFTKEYS mustH} be loaded first. In other words, do not append SOFTKEYS to TURBO-BASIC. Append TURBO-BASIC to SOFTKEYS. Be sure to use FLH}IB2.EXE with TURBO-BASIC.You can use the DOS utilities from TURBO-BASIC with SOFTKEYS installed. The utilities will then wH}ork with SOFTKEYS. However, you cannot get back to BASIC by reloading the SOFTKEYS/TURBO-BASIC file. You will need to rebooH}t ([OPTION][CONTROL][X]. You can also append the entire SOFTKEYS/FLIB/TURBO-BASIC file to KILLKEYS.EXE. KILLKEYS.EXE will tH}code you will replace it with is not ATASCII. The easiest way to find the correct key code is to use the following short BASD}IC program. 10 ? PEEK(764):GOTO 10Run the program and press the key you want to use. The decimal code for the key will pD}rint on the screen. Just replace the check byte with the new code and it will check for the new key.code for the key will pDfurn off SOFTKEYS so the appended file will not try to activate SOFTKEYS when it is already active.So far I have been unableH} to make SOFTKEYS work with Atariwriter or Atariwriter Plus.e SOFTKEYS when it is already active.So far I have been unableH=  FF                    L}                          L}        Technical Notes for SOFTKEYSNote 1:SOFTKEYS must insert itself into the keyboard inL}terrupt routine. It does this by replacing the address at the keyboard interrupt vector with it's own start address. BeforeL} doing this SOFTKEYS steals the original address at the keyboard interrupt vector and stores it at SOFTKEYS' own exit vector L}($0400). The keyboard vector may have already been stolen by another routine, such as DISKIO. This doesn't matter. SOFTKEYL}S just becomes another link in the keyboard interrupt chain.All this vector theft takes place in the SOFTKEYS cold-start roL}utine and only needs to be done once. The memory used by the cold-start can be over written if needed.Note 2:Protecting L}SOFTKEYS from [RESET] is a little more complicated than inserting it into the keyboard interrupt routine.First the SOFTKEYSL} cold-start steals the DOS initialization vector (DOSINI). The computer uses this vector whenever [RESET] is pressed. SOFTKL}EYS then puts it's own warm-start address in DOSINI.DOS must be initialized after [RESET] so the first thing the SOFTKEYS L}warm-start does is jump to the original DOSINI address. (DOSINI may have already been stolen by another program but that doeL}sn't matter as long as things are done in the proper order.) When DOS initializes it puts it's own initialization address baL}ck in DOSINI. SOFTKEYS then restores it's own warm-start address in DOSINI.The computer's reset routine also restores the L}default address in the keyboard interrupt vector. SOFTKEYS has to put it's address back during it's warm-start.Note 3:FLL}IB.EXE and FLIB2.EXE are located where BASIC would like to put it's programs. To protect themselves, these FLIB files changeL} the address in MEMLO to reflect their presence. (MEMLO must also be changed after [RESET] is pressed.) They do this by appL}ending their own initialization routines to the end of the SOFTKEYS warm-start routine.Making Your Own FunctionThe folloL}wing is a routine to turn off SOFTKEYS. Use this as an example of how to make your own routine work with SOFTKEYS. It is wrL}itten for MAC/65.J4 = $0432EXIT = $0400VKEYBD = $0208ENDWARM = $0470NOKEY = $FFCH = $02FCENDLIB = $L}2981GLBABS = $02E0;;; * = ENDLIB;KILL LDX EXIT LDY EXIT+1 STX VKEYBD STY VKEYBD+1;DONE LDA #NOKEYL} STA CH PLA RTI;ENDFUNCTION;;initialization;;changes jump table; * = J4 JMP KILL;;NEW PROTECL}TION ROUTINE; * = ENDWARM LDX # ENDFUNCTION STX MEMLO STY MEMLO+1 RTS;;IL}NITIALIZATION TAILER; * = GLBABS+2 .WORD ENDWARM;The initialization tailer tacks the initialization address to L}the file in the standard DOS format. The above function is assembled to work with FLIB.EXE. To make it work with the other L}flib files, check the file FLIB.ASM to find where the desired file ends (the address of ENDLIB). You could also edit FLIB.SRL}S to include the above function. ENDWARM is the end of SOFTKEYS warm-start. ENDLIB is the end of the original FLIB file.SRL{ L?L^qKIh@0 ܮyWyWЩPyɩ0LwL$&LP pB.SOFTKEYS B SOURCE B DISK B B By B Bob B DuHamel B B%DOS SYSB)Diskio_KRUNBFSOFTKEYSEXEBHFLIBD EXEBJFLIBDOS EXEBKFLIB6 EXEBMSOFTKEYSSRSB%_FLIB ASMBFLIB SRSB=SOFTKEYSDOCBNOTES DOCBTECHNOTEDOCBKILLHEADEXE