+JJJJ 4`&'x=A \歉) +)V +е+^L  =qf^!~2>`~22\!!B!~> >#0~O#Cx2͘1)ͽÂf zͧÆBAD LOADCOMf^: ! Â$$$ SUB\X COPYRIGHT (C) 1979, DIGITAL RESEARCH _͌> ͒> Ò> Ò͘~#͌ì _2<ݯ2ͩw"C{2!"E9"1A22!ty)K!G_^#V*C~E ,&-AGMS!!ô!ô!Bdos Err On : $Bad Sector$Select$File R/O$:BA2!~6 އ!2:2a{_:ʖ:>Ľʖ:=2–!B!6#5ʖ:Ľ!ͬʧ )!F#xʺ~0wëw!" !~6ͽ:ý(! O͐  :E B 2>: b# : y! 4 5~yy5 6yҐ^H@Oy H H: –ͬ  #H: !  Hù H H $O͐: 2 *CN# #͘*~ "߷"͌#>?͌͘ =_.:;<> O߅o$>!Y2*O"ʉ@G:ʐ:wÖx2p0ʹ#*©6?ëw˜0ï#6 ¹.0#*6?w0#6 #6" x: 2 p&x~+é72 H! >w_: ! 5ͤNkͱ¦ͱxʊ#Nx: ! 2 ͤ! 5™#wO~x½p Hy<< ʑ :!qMD##~?  xDIR ERA TYPESAVEREN USERw!yO#< Ty#O 321y_͸2y2ͽ:ݷ˜1͘A͌>>͌92^ :¥.!_~#fow]!v"!çREAD ERRORçNO FILE^:2E>! ^#V w#P:BO|^#V#"##"##"##"!O*!O*|!6ʝ6>*w#w*w#w'û*! J*""!N#F*^#V*~#foyx*{_zW+* ! ~ 3#0 Wx x ߀ ߂ G ~ # 3x~#B!Y~ɯ2:=!ý:=!:ý^T!~  6?#ˆ:`O> K{͘A͒>:͒͢>:͒͢xK > K > ͒x yx#*DM*s#r*s#ryOxG*0MD!!N: EG>O: \S*C :qn& ^#V>O^"*}:*)=":O:o"*C *C!ͮ~2~2ͦ:2ͮ:O:w:w |g}o*#  ͢ØÆ^ BRͧ9!5‚#~Y‚#"T<ÆALL (Y/N)?^ Tʧ͘!6!~ڇ w4!Y~ʆ͌†t=ʆf ^ T 2o&)|+!<ͧ ):BO!yoxg*:BO}!N#F "*#*s#r^ ~!J! J*:o$*C~i6iw**{#zr+s{ozg**͕** ,w͜͸Ͳ!!N#F$**O!~#:A#~$=2Ek͌::/GyO>2!q*C"͡ʔ*JҔ^:Oyʃ?|x | s-|N-# S:2E!~Яw>T D^6k-äPYy 5*{zBK52ͷ>22*["*]"!%:OF#xN#N#F#x^#V#!~6# \2|\< *C ^OT *C~wD -'  -@ͦ~^*C Ox! N!Fwyxʋ>ڋ>*Cw~#+w#w+ɯ2E22i^ *C :~w~͔͔# # \(bp_÷bYbK{ṕQOͿJÿzOͿ÷:!a_~:!e::!i::2y2o&)))"! ~(F:L(N{8J:_:OͿ**)"^#fkͷ(! w ~>2!E5T*C!"C"C!w# F! w͌x2͢*C ~<wʃG:!ʎì 4~ʶ¬:<ʶ$ʶïZͻx>2>2ͻ:!Z2:Eẅ́͊Ͳ>:O:26*)Cy2C4>222>242y2 ~2:2*":2:(E=2:! 8!̈́ 0:! '4~ݾ8 6*#"!F6!:<ݾ p22~(>22Fx:(2!~6(+:! !̈́ :!(2>2T*CGͻ:ẅ́n>2;O ^DM;}H>"*C ::ddslO s#r:E͊:==»y==»*Ww#*"͸*:G#š"͸:!w4!iw:Z!E~=26.:( *:2*":2:Đ2:ݦg>o[[: >2: : 2":O:(22y!#!: ]0:OͿ*^Vͷ2!90: Rd!: f0:OͿ*^Vͷ2*C!!~~#~O~G#n,-.‹! w! yG!x͢.:E<ʄ! q!pQ:E<. ʄ$.:E<ʄi6}2ExN! ~态O>G~G!~G} *C!r#r#r ^ͥ_y#x#{2!90: Wr^V:OͿ[[:o&))):ƃ_! ~[~*>y:*:_WGOR0:! Ncoi`@>=@>=@0 @8yͷ_ͷWKͿJͿz(@8  {( G@8 s+p+q-*C ͥ!!q#p#w*:BOYG}*MD "ã:!Bw!>2*C~=2u:B2~2wE:A*Cw>"!""2B!"!rQQQâ~?ͦ~?rQ*"CQ-Q͜QüQrQ$Q*z( @0  {( G @0 >`*[KH`:K7͜!͜:O!͜:AO !͜K!͜:O!͜02͙:_RA 27!~"O *# Bios Err= D=: T= S= R(etry E(xit A(bort y2x:2:0:8O):B"*)*)Q;*"E:;:A2AQÓQÜQ*C}/_|/*W}_*"}o|g":ʑ*C6:ʑw:2E**E}DQ>2 Mtd'XH6<,E Tcr3)09CHVÍÛ %*B"ämE 6F1`22222=2!_o!%ͻ>G^*N( !͜!V͜E:M((*P(!\]$6 w#w2\2lZRç$  $!DRIVERS AUTOST COM CP/M Ver 2.2 (C) Digital Research, Inc. PCPI Ver 2.0 (C) Personal Computer Products, Inc. Rights licensed to MicroPro International Corporation LOAD DRIVERS LL"LLLLLLLL=Llݲbe Zp0BFJҶ `  / ;L|]lMV_|  D.00Z[ ȱLL 0)>J>J>VU)?`8'x0|&HhHh VY)'&Y)xꪽ)' `Hh`V0^*^*>&` aI꽌ɪVɭL)L Llui)?uvwlk?8=v@>wABC膅\] u;vȭ<vݢQIʈp z } /G.H  F8&Y&&Y& 꽌ɪ\8`&&꽌ɪɖ'*&%&,E'зЮ꽌ɪФ`+*xS&x'8*3Ixix&& 8  '  & x)*++`ILl.  . 21 34 /0 . 65 $%I` /lllx( ei ,i к /Hl&,h)_R M #l* #l(.FG8`0($ p,&"ųųೳŪŪųųij  !"#$%&'()*+,-./0123456789:;<=>? F. <; L )L/llE ` 泅 泅L 泅 泅L 泍hgL 泍zy ` 泅l.00`.` L.`H hL   1 '" *"( (9"1 ( ,.(0# 2  /#0/#0 *?'#07#00/0/'#07#0:"4<*55/**5/*%5/)1/)1/)1/)'#0/#0*5/*75/**5/*:5//#0/#0'#07#0:::*::'#07#0"):$(%"%:$(%"%$$2%4%$$2%4%$(2()!).0`! 泍  L?!. 泍mm.L. . 泌m .L. . ! J J E(!8b $!H(+ "@H !D)"E` @ $ C ` DQ &J80^݌Hh ü ü݌ ռ ռ ռA ļD ļ? ļAEDE?HJ>h Լ ռ ռ ռ`HJ>݌h Hh݌`葠葠ȔЖȔЖȠ vȱwmmem ȱl . . n qLc`789:L .L LK Hvw. hL vw. HIHHHHhHH݌hHhHh݌H6 VDP (ED Z $0x8x D- ܸDD#{8 $(Ѷ) @(` ,8``^ڷ1-) շ_ շշ` `Է۷۷ݷ޷ȱⷭԷ)巭跭鷭ط׷ `ڷ۷`ٷ      H8`?E Vk *f???0xE Hh D#-EEE8` D ܸx D - ܸx8`-0ݩ?ʥD EEE`   LDcpq` [` ~  LREAD ME RDTEST COMSTAR3 DOC#STAR1 DOC= !BUFFRAM DVR DIG128K DVR WRTEST COM&RUNTEST COM' SFTVIDEO.DVR (on your STARCARD utility disk) for: EPSON APL (printer) card in slot 1 ZARDAX shift and control key mods 3. Read the file STAR2.DOC This describes the drivers included on the disk that you could use duriSBOOT COM(SCRASH COM)C6TEST COM*C7TEST COM+SFTVIDEPDVR<,-./0123SAT128K DVR4MEM32K DVR5MEM16K DVR6ng INSTALL. Briefly though: SFTVIDEP.DVR is SFTVIDEO.DVR modified for the EPSON APL (printer) card in slot 1. SAT128K.DVR lets you use a SATURN 128K ramcard in slot 0 as a ramdisk (G:). STAR2.DOC tells you how to alter this if thMBASIC DOC78STAR DOCCDEFGHIJKLMNOPQRSTAR DOC0STUVWXSTAR2 BAK DRIVERS Z"#$%MUSIC COMSTAR2 DOC9:;e ramcard is in a different slot. DIG128K.DVR lets you use a DIGITEK 128K ramcard in slot 0 as a ramdisk (J:). BUFFRAM.DVR must be used instead of BUFFER.DVR when using the ramcard in slot 0. Otherwise both the printer bu STARDISK 1 ---------- FERG BRAND JUNE 1986 All you ever wanted to know about the STARCARD! Here is the approach I recommend to this disk: 1. Read the file STAR.DOC This describes the way the STARCARD and the APPLEffer driver and the ramdisk driver will try and use bank 1 of the ramcard at the same time. MEM32K.DVR lets you use 16K of memory plus the language card as a 32K ramdisk (H:) instead of as a printer buffer. Do not use BUFFER.DVR wit communicate with each other. Files associated with chapter 1 are: RDTEST.COM WRTEST.COM RUNTEST.COM SBOOT.COM SCRASH.COM C6TEST.COM C7TEST.COM Files associated withh this. (The printer will still work though.) MEM16K.DVR is for those with a 48K APPLE II+ without a language card. It lets you use 16K of memory as a ramdisk (I:) instead of as a printer buffer. Again, do not use BUFFER.DVR with this. chapter 2 are all on the DOS 3.3 side of this disk. RDTEST.DOS WRTEST.DOS IDTEST.DOS READ, READ/BIN, CALL -151 2. Read the file STAR1.DOC This describes how drivers are loaded and how to modify  !0>20!0~_# M. We are going to modify this program to read TWINKLE. L Change LXI D,FB09 to LXI D,7B80 LXI D,0008 to LXI D,0880, twice S11A C9, this places a RET at this point. SAVE 1 R1.COM iv commands: #1 READ from APPLE memory #2 WRITE to APPLE memory #3 RUN a subroutine located in APPLE memory To send the commands, parameters and strings of data and receive data, we make use of six subroutines located iyour original APPLE and the STARCARD) racing along at different speeds at the one time. Occasionally they need to talk to one another. The APPLE looks after the keyboard, the monitor and the disk drives. So, for example, if a key is pressed, &i @SEND DRIVER\:!\="!"9̀!"9!~̀!5o*9^VSͯ^VSͯͺʴ^Vͯͺ *9[͚*<<<":O:̚[~n STARCARD memory. RDHSTBYTE at $FFE0 reads one byte from the APPLE RDHSTWORD at $FFE6 reads two bytes, i.e., one word, from the APPLE RDHSTBYTS at $FFEC reads a number of bytes from the APPLE WRHSTBYTE at $FFE3 writes one bthe STARCARD must listen to the APPLE and conversely, if a message has to be sent to the screen, the APPLE must listen to the STARCARD. The aim of this document is to show you how to write programs that manipulate the APPLE whݶĚ."9 7~N,!?!~, w,(T~- E!7_7WS</W7[<{zѺ($  |w->~2!?RAM DISK>2>!7>>G:>=2> >2>!7 xSTARCARD NOTES #3 ----------------- FERG BRAND JUNE 1986 RUN YOUR FAVOURITE APPLE MACHINE LANGUAGE PROGRAM FROM STARCARD --------------------------------------------------------------- On the DOS 3.3 side of this disk is a machine laile in the STARCARD operating system and vice-versa. *The STARCARD, also known as the APPLI-CARD, is made by Personal Computer Products, Inc., USA. CHAPTER ONE ----------- HOW THE STARCARD TALKS TO THE APPLE ------------------7O >G:>=2> x=>2>!xG:>=2> >2;!O> 2>7(>2;#:>=2> :;! >#z A8w~Oy{N#Úͺ_ͺWKJ@Һ @yNO DRIVER FILE $NO ROOM FOR THE CODE IN THnguage program TWINKLE. Try it. BRUN TWINKLE. Here are a series of steps that will allow it to be stored as a CP/M file and executed as a CP/M program. i Boot DOS, BLOAD TWINKLE, get into monitor (CALL -151), AA71.AA72 will tel d. It lets you use 16K of memory as a ramdisk (I:) instead of as a printer buffer. Again, do not use BUFFER.DVR with this.E 6502 $NO ROOM FOR THE PAGE 0 $READ ERROR $ DONE! $>2;!O> 2>RAMDISK ID :;! >#z A8w~Oy{Nl you that the starting address is $7B80 and AA60.AA61 will tell you that the length of the program is $0880. ii RUN COLDBOOT and boot STARCARD CP/M. (Don't turn off the power, we want TWINKLE to remain in memory.) iii DDT RDTEST.CO there is a cluster of routines that are resident in the STARCARD's memory that we can use. To use them, we must 1. Send the command number to the APPLE, then 2. Send any parameters that are required. There are three important  SOFT VIDEO ԩ     (<(P@@(@    `NTYVSL}`L} ~`~ ~`` ```P`LELJ,a ,b }LE1  2ĩ1 4635 79z):/-.0,&-//L1./ Clpk DIG 128K CARD   / Ѕ`@8HJJꎄh)i q@  ` A, AA`+2* LE&  ' (21  R0 /`56x i,,(`lC`L9 ` 9 `34x ,,(`lE``7 ` 7 `),,`J,,`,1 Z `+B AB`A AB``DIGITEK 128K CARD IN SLOT 0 BECOMES RAMDISK J:FERG BRAND 1986 ,`344?`;G; H3I4J7K? LCMD`NEOF`H )_C, } h(lz # #G G-/`GKm8I΍iح)~NnNnR I` I HH08did08 i 0 6~ 6 6` L9`` U   U8 Là0l `L `hhLC`MOD FOR SAT CARD t PRINTER BUFFERdltt@qЁЂ_ .25.5.75K Printer Buffer in use.  ,a0,b0 &z becomes MVI C,02 LD DE,0300 becomes LXI D,0300 LD HL,011B becomes LXI H,011B Other Commands -------------- There are some other commands. #5 CONNECT a device driver. Device drivers look after scre AA A@A!@"$$$$ I$@BBBB!$$IH@@  ! " $I$$$$ I IH @@'{|&}'HhH# J h Kx40/0&0!HUULHU((HIK } ` ` 645379 tSTARCARD NOTES #2 ----------------- FERG BRAND JUNE 1986 RAMDISK DRIVERS --------------- 1. SATURN 128K RAMCARD IN SLOT 0 -------------------------------- I put this driver after APLFLPY.DVR in the INSTALLation but its position is you use $4000-$8000 of APPLE memory as a 16K ramdisk, drive I: Do not install a BUFFER.DVR if you use this! FFER.DVR if you use this! 5. MEM16K.DVR ------------- For those with a 48K APPLE II+ and no language card. It lets You can't use A: to F:, these have been commandeered by APLFLPY.DVR. (Oh well if you really insist on calling your ramdisk drive C:, try the following: DDT APLFLPY.DVR S108 change 06 to 02. This reduces the maximum number not critical. As long as it goes after SFTVIDEO.DVR and before BUFFER.DVR. It converts the ramcard into drive G: It has the same capacity as a normal disk. If you want to use this driver in another slot, slot 5 say, do the fo,0L Q͒[,aI0 c0=  Q ͒  Li . !  L,a nL,b vL&c0! .(  LILA [i L͓ !`ll!'-/()<>"1789,.2|`_\{}[]~|`{ of drives this driver can serve from 6 to 2. Save this modified version.) 3. BUFFRAM.DVR -------------- A test to see if the directory tracks have been initialized in the ramcard is inserted into the language card tester of llowing: DDT SAT128K.DVR ;Change all code like AD 8B C0 to AD DB C0. In general, $8B will become ($8 + $slot num) * $10 + $B. In particular, S14F DB . S152 DB . S18E D0 . }[]~@^] PNM HHH hhh(` ` ` L9`,)H 0h` )L{  )`ȹ Ȅ ! `̿`yȊL8` H& i e 8 h BUFFER.DVR. If the ramcard is being used as a ramdisk, BUFFER.DVR is tricked into believing there is no language card. If your ramcard is in some other slot, you can use either BUFFRAM.DVR or BUFFER.DVR. This driver should be t S1AD D3 . S1B0 D3 . S1DA DA . SAVE 3 SAT128K.DVR If the ramcard is in slot 0, there could be a problem if both the printer buffer driver and the ramdisk dr Ȍ` `   ` LJ`  ``;```a{8 `  bV6J>ny5 he last one installed as it has to see what ram is left for this purpose. Of course, if you do not want a printer buffer, judt omit BUFFER.DVR or its variants. The printer will still work. 4. MEM32K.DVR ------------- This iver both want to use bank 1 of the ramcard. BUFFRAM.DVR should be used instead of BUFFER.DVR. 2. DIGITEK 128K RAMCARD IN SLOT 0 --------------------------------- Same remarks as for SATURN card. SAT128K.DVR configures the SA  . ` L0 l QL yL0i( hL08( uL0i hL08 uL0IL5IL5IL5IL5IL5IL5 ;U  Q    LL ;K  QL5 ;P  Q driver lets you use $4000-$8000 of APPLE memory plus the language card as a 32K ramdisk, drive H: Do not install a BUFFER.DVR if you use this! 5. MEM16K.DVR ------------- For those with a 48K APPLE II+ and no language card. It lets TURN card as drive G: DIG128K.DVR configures the DIGITEK card as drive J: If you want to change these letters, DDT the driver, then S106 change from whatever it is to nn, where nn is 06 for G:, 07 for H: and so on up to 0F for P: L5 ;Z  Q   WLL ;L0 34 4 43 ` Ly   `HHH "i( ~ 5 hhh`HHH "hhh`(>? `H h ~ L On some computers you will need . See the STARCARD manual, page 2.6. COMMUNICATIONS WITH YAM ----------------------- YAM is the public domain communications program 'Yet Another Modem'. I have been using it for++PPW ++ ++ ++PPW >? 轎 莉  轎 轎 莉 $  ~  L    L  H^ n hi@ n L  5 `    = \ ~     0 U  z    ^X EXIT ALTER MODE some time now with the Microsoft SOFTCARD in conjunction with an APPLE COMMUNICATIONS CARD in slot 2. Of course the original program will not work with the STARCARD because it relies on accessing the status and data ports,  ^B SCROLL TO FIRST COLUMN<- SCROLL SCREEN TO THE LEFT-> SCROLL SCREEN TO THE RIGHT^A SCROLL TO PREVIOUS 40 COLUMNS^F SCROLL TO NEXT 40 COLUMNS^L TOGGLE SHIFT LOCK = ^V TOGGLE UPPER CASE AS INVERSE = ^Z TOGGLE AUTO SCROLL $C0AE and $C0AF respectively, on the communications card. On the other hand, SFTVIDEO.DVR does know there is a communications card present, but that does not help us in this instance. The data port on the communications card can be rR1. This fetches TWINKLE, (it was sitting in APPLE memory) and stores it in STARCARD memory starting at $3000. v DDT RUNTEST.COM. We will modify this program now. L Change LXI D,0300 to LXI D,7B80, twice = ^I TOGGLE SHIFT MODIFICATION = ^O TOGGLE LOWER CASE MODIFICATION= ^Q TOGGLE ALTER MODE INDICATOR = ^E CHANGE ALTER MODE CHARACTER = ^R CHANGE RUBOUT CHARACTER = ^C CHANGE CLICK VOLUME(<- OR ->) = ^W CHANGE SCREEN WIDTHead or written to by BIOS calls to the PUNCH and the READER. However, YAM requires its own access to the status port. It does its own checking before reading or writing. I wrote a new file YAMEXTRA.C which I included in the group of f LXI D,0006 LXI D,0880, twice M 3000 3880 126. Move the code to the end of RUNTEST.COM at $126. 3880 is just 3000 + program length. vi SAVE 4 MUSIC.COM. A file of $880 + the $26 bytes of RUNTEST requires 4 * 256 b{!&{ɢ|}`~ {`` {`H0h`$$55\\$$55\$$55\$$55\\iles to be compiled (I'm using BDSC) and made some changes to YAMSYS.H. All of the other files remained intact. YAMEXTRA.C ---------- /*Routines for STARCARD because APPLE 6502 addresses for APPLE COMMUNICATIONS CARD are not directly ytes of file space. vii MUSIC SBOOT and SCRASH ---------------- You can achieve the same effect as SBOOT by R. R must be typed in straight after reset. You can achieve the same effect as SCRASH by M. accessible. FERG BRAND 25-Jun-86*/ char calla(); ststat() { calla(0xFFE3,0,0,6,0); /*Runs WRHSTBYTE with 6, the read command, in C register*/ calla(0xFFE9,0,0,0,0xC0AE); /*Runs WRHSTWORD with status port address in DE reg" hh"`0LYH h `H  i9h`HiN  h`LH HH  hh hlHH:J/80* 8hHH YhLhhLY  ,Q,T` q  8 8LL --------------------- ! APPLE ADDRESS! !I/O PORT ! ! !---------! ! ! $C0n0!<<< 8 <<>> 8 >>>!20 ! ! !---------! ! ! ! ! ! ! S $s the data byte*/ } stdatawr(data) char data; { calla(0xFFE3,0,0,7,0); /*7 is the write command*/ calla(0xFFE9,0,0,0,0xC0AF); calla(0xFFE3,0,0,data,0); /*Runs WRHSTBYTE with the data in the C register*/ } YAMSYS.H`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ (<- OR ->) = ONOFF     Ȍ n L# `8dȰidm  0 n 8 Ȱi m  0 n 0 n `- Ȍ `H? h`H h`L2 L. L6  L6 L. L$  tJJicJa[[ 0JDL2 )9)4) -------- The important changes are: char ststat(), stdatard(); #define MIMASK 0x01 #define MIREADY (ststat() & MIMASK) #define MICHAR stdatard() #define MOMASK 0x02 #define MOREADY (ststat() & MOMASK) #define MODATA DPORT #defiζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H/)-H h  l  8``ll`L! La L LLLL   1  !`  ```   MȽ`  `` HH  hne Sport SPORT #define Dport DPORT #define inp(SPORT) ststat() #define peek(SPORT) ststat() #define inp(DPORT) stdatard() #define peek(DPORT) stdatard() #define outp(DPORT,A) stdatawr(A) Most of the last group are just sort of housekeeping n o >8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H h  `l  $ 9`` L*  k` { jmki) ``,L,`P@0 p`P@0L,Xx)xL,Yx @x0L L    "HH  things because the same objects sometimes appear differently in the other YAM files.  #define peek(DPORT) stdatard() #define outp(DPORT,A) stdatawr(A) Most of the last group are just sort of housekeepingW h W `,ϘHh` `8``lRt) a_l#kLM`JK U0+ NO  Ȍ`LPQ iS`LJK iS L)L1 at $DD2F. The STARCARD also tests slot 1 and comes up with the same answer as the SOFTCARD - there is nothing there. The fix is more difficult because with the STARCARD you have two microprocessors going at once; not one as with the SO @I$@" IHB@HHB@ $ I@!!@$@ @@! @$ *$@ H$$A$A$! IHB$@$$IH)8jmT`ii  5` à0l !"#$%&'()*+,- Pm 8mȌFTCARD. The STARCARD carries its own 64k on board.The critical memory location where the result of the test is stored is in the ordinary APPLE memory. Although this is accesible when the STARCARD is operating, it is too late to change an$!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I m80y   m]i &^< UT  L)0ix  L "p d LJKything. The test is carried out by the SFTVIDEO.DVR part of DRIVERS (DRIVERS includes, in the version I use, SFTVIDEO.DVR, APLFLPY.DVR and BUFFER.DVR) which must appear on any STARCARD boot disk. This is written in 6502 codeSTARCARD NOTES -------------- FERG BRAND MAY 1986 (updated JUNE 1986) 1. TWO Z80 CARDS AT ONCE ------------------------ Godfrey Gamble suggested to me to put my Z80 SOFTCARD in slot 4 and my STARCARD in slot 5. It works! No apparent&UQ>`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4. As I understand it, what happens is this. On booting, the STARCARD system (which was created using the file STARCPM at installation time) loads the DOS, and then loads the DRIVERS into the APPLE's memory. It then adjusts all conflicts so far. If I boot with a SOFTCARD disk, the STARCARD is ignored and vice versa. 2. PRINTER PROBLEMS AND THE STARCARD BOOT PROCESS ------------------------------------------------- I have an APPLE II+ with an EPSON APL card in s`ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO the JMP and JSR instructions so they point to the right places. In the DRIVERS file they don't. This is called relocation. The system looks at a map that is tacked on the end of each individual part of the DRIVERS file and fixes up each lot 1 driving an AMUST80 printer. The Z80 SOFTCARD tests slot 1 to see if there is anything there, decides there is not, and ignores any control-P's for printout. The fix is easy. Either (i) run EPSON.COM, or (ii) use DDT to put $3(08@H  .`f   Y  R RV Y `8`SC:SFTVIDEO.ERLA SFTVIDEOERL54Iw6ǀ0 p#`T 0< P8RC!0W;instruction one by one. The system then goes to the initialization subroutine in SFTVIDEO.DVR. Among other things this tests each slot to see if it can identify the card there. The EPSON APL card fails, as it does with SOFTCARD CP/M, because cognises this. When the key is pressed, the contents of address $C063 become positive. Shift lock is a bit more complicated though. ZARDAX, the word processor, has a much nicer scheme. The shift key shifts and the control key lo ;The point in the slot test routine I chose was at $16E7. Remember that programs start at $0100 using DDT. Make a JSR to the working area. S16E7 20 70 19 . ;Put new code in wor not all of the memory on board , from $C100 to $C1FF, is readable. SFTVIDEO.DVR also tests, just like PRODOS does, to see what variety of APPLE you have. Finally it erases all this initialization code and waits for instructions to come cks and unlocks. Can we make the STARCARD use the same hardware? Yes. The ZARDAX modification is to remove the 558 integrated circuit, plug in a special i.c. socket with a couple of leads attached and put the 558 back on top. The king area. S1A70 C0 01 D0 02 A9 05 99 6D 8F 60 . ;This is just 6502 code. C0 01 CPY #$01 ;Are we through from the STARCARD. So what I did was go to SFTVIDEO.DVR and find an area that was not being used to write over. I found the slot test routine and replaced some code by a JSR to my working area. Back in my working area I reinstleads go to pins 3 and 24 of the keyboars connector. When the shift key is pressed, $C067 goes positive; when the control key is pressed, $C066 goes positive. (Or perhaps vice-versa if your leads are connected the other way around.) testing slot 1? D0 02 BNE A ;Branch if no A9 05 LDA #$05 ;05 means a good printer card 99 6D 8F A:STA $8F6D,Y ;Store result 60 RTS ;Fix relocation bit map. S1DBD ated the code I had just replaced and put in instructions to poke the correct answer about the printer slot, and adjusted the bit map for the relocation procedures. Finally I INSTALLed the new SFTVIDEO.DVR. How are all the changes made? UsTo make STARCARD recognise the ZARDAX shift key, here are the steps. I'll abbreviate the write-up this time. ZSID B:SFTVIDEO.DVR S052E 67 . S0595 67 . SAVE 30 B:SFTVIDEO.DVR 82 . ;Now get out of DDT. ;Save the new version. SAVE 30 B:SFTVIDEO.DVR ;I have put this version on the STARCARD side of the disk as SFTVIDEP.DVR INSTALL 3. USIe DDT or its Z80 equivalent ZSID. Here are the steps in detail. Make a STARCARD disk with STARCPM, DLDRIVER.COM, SFTVIDEO.DVR, APLFLPY.DVR, BUFFER.DVR, CONFIGSV.COM and INSTALL.COM on it. This will be your mucking around INSTALL Now to make STARCARD recognise the ZARDAX control key modification. I'm not sure I really like this alteration. It gets in the way when I use WORDSTAR with all its control key commands. We cannot use the working aNG THE ZARDAX SHIFT MODIFICATION -------------------------------------- The STARCARD shift modification is to join pin 24 of the keyboard connector to SW2 of the game i/o connector. When the shift key is pressed, the STARCARD software re disk. Put the STARCARD disk with DDT on it in drive A: and your mucking around disk in drive B: Cold boot. (From now on I'll just write down what I typed. I'll use ; to indicate comments.) DDT B:SFTVIDEO.DVR rea I used before because it is erased by the initialization routine cleared and the new subroutine must be present all the time. There is a help screen that is used in some 40-column configurations. I'm using 40 columns so I'll wί``8J)ϭJJJJ Q SAVE 30 SFTVIDEO.DVR INSTALL Of course you could make all these software changes at the one time. +2* LE&  ' (21  R0 /`56x i,,(`lC`L9 ` 9 `34x ,,(`lE``7 ` 7 `),,`J,,`,,`344?`;G; H3I4J7K? LCMD`NEOF`H )_C, } h(lz # #G G-/`GKm8I΍iح)~NnNn!&ɩ `孌08did08 i 0 6~ 6 6` L9`` U   U8 Là0l `L `(!Ϡ͠ AA A@A!@"$$$$ I$@BBBB!$$IH@@  ! " $I$$$$ I IH @@   !&ɩlPFC) 1977, DIGITAL RESEARCH ZSID VERS 1.4$1/ !~=W!xe ~#Xbxʇ {z~#o}o҃i.*"#":2222!=8J9( 2 ) 1977, DIGITAL RESEARCH ZSID VERS 1.4$1/ !~=W!xe ~#Xbxʇ {z~#o}o҃i.*"#":2222!=8J9(!&ɩi o  SOFT VIDEO ԩ     (<(P@@( = ^I TOGGLE SHIFT MODIFICATION = ^O TOGGLE LOWER CASE MODIFICATION= ^Q TOGGLE ALTER MODE INDICATOR = ^E CHANGE ALTER MODE CHARACTER = ^R CHANGE RUBOUT CHARACTER = ^C CHANGE CLICK VOLUME(<- OR ->) = ^W CHANGE SCREEN WIDTH Ȍ` `   ` LJ`  ``;```a{8 `  bV6J>ny5 (<- OR ->) = ONOFF     Ȍ n L# `8dȰidm  0 n 8 Ȱi m  0 n 0 n `- Ȍ `H? h`H h`L2 L. L6  L6 L. L$  tJJicJa[[ 0JDL2 )9)4)  . ` L0 l QL yL0i( hL08( uL0i hL08 uL0IL5IL5IL5IL5IL5IL5 ;U  Q    LL ;K  QL5 ;P  Q1 Z /)-H h  l  8``ll`L! La L LLLL   1  !`  ```   MȽ`  `` HH  hL5 ;Z  Q   WLL ;L0 34 4 43 ` Ly   `HHH "i( ~ 5 hhh`HHH "hhh`(>? `H h ~ L R I` Ih  `l  $ 9`` L*  k` { jmki) ``,L,`P@0 p`P@0L,Xx)xL,Yx @x0L L    "HH  >? 轎 莉  轎 轎 莉 $  ~  L    L  H^ n hi@ n L  5 `    = \ ~     0 U  z    ^X EXIT ALTER MODE,0L Q͒[,aI0 c0=  Q ͒  Li . !  L,a nL,b vL&c0! .(  LILA [i L͓ !`ll!'-/()<>"1789,.2|`_\{}[]~|`{" hh"`0LYH h `H  i9h`HiN  h`LH HH  hh hlHH:J/80* 8hHH YhLhhLY  ,Q,T` q  8 8LL ^B SCROLL TO FIRST COLUMN<- SCROLL SCREEN TO THE LEFT-> SCROLL SCREEN TO THE RIGHT^A SCROLL TO PREVIOUS 40 COLUMNS^F SCROLL TO NEXT 40 COLUMNS^L TOGGLE SHIFT LOCK = ^V TOGGLE UPPER CASE AS INVERSE = ^Z TOGGLE AUTO SCROLL }[]~@^] PNM HHH hhh(` ` ` L9`,)H 0h` )L{  )`ȹ Ȅ ! `̿`yȊL8` H& i e 8 h  / L݄ʊ  /Ll K LoA[)? *L_  * ,)?,) @   `  =TY)(jk^q;+*:  $` ` ` `` `$!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I m80y   m]i &^< UT  L)0ix  L "p d LJK`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ @$IB PUUUUU@"A@HD@$IDHHD$" @@@"  @ @H @"@$ HA!$ !  @D$AD@$$ @"I$IIII@$I$I$$$I @ A"@@@@ H&UQ>`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4ζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H $ @ !UUUUUUUUT*`ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO  n o >8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H (08@H  .`f   Y  R RV Y `8`m`SC:SFTVIDEO.ERLA SFTVIDEOERL54Iw6ǀ0 p#`T 0< P8RC!0W;W h W `,ϘHh` `8``lRt) a_l#kLM`JK U0+ NO  Ȍ`LPQ iS`LJK iS L)L @I$@" IHB@HHB@ $ I@!!@$@ @@! @$ *$@ H$$A$A$! IHB$@$$IH)8jmT`ii  5` à0l !"#$%&'()*+,- Pm 8 pȌClpk SAT 128K CARD   / Ѕ`@8HJJiih)i q@  ` A, AA`   `+B AB`A AB``SATURN 128K CARD IN SLOT 0 BECOMES RAMDISK G:FERG BRAND 1986 DOWNLOADED FROM THE GALAXY BULLETIN BOARD UPLOADED TO THE GALAXY BY KEN LAU, ON THE 05-NOV-86 AT 14:11. -------------------------------- PATCHING MBASIC FOR THE STARCARD -------------------------------- THESE PATCHES ENABLE THE SOFTCARD (APPLE C HHP/M) VERSION OF MBASIC (REV. 5.2) TO WORK ON THE STARCARD WITH THE EXCEPTION OF GRAPHICS. THERE ARE 2 MAIN PROBLEMS OVERCOME BY THESE PATCHES. FIRSTLY, MBASIC SEARCHES FOR A CERTAIN BYTE AT THE START OF BDOS TO DETERMINE THE MEMORY AVAILABLE. FOR SC`d_ MEM 16K RDISK    @P`@ qiɀɐiPi?Hh@  ` A, AA``+B OME REASON, THIS BYTE IS UNIQUE TO THE SOFTCARD'S VERSION OF CP/M. ONE OF THE PATCHES BELOW CHANGES THIS SEARCH BYTE. THE OTHER PROBLEM IS THAT MBASIC EXPECTS TO FIND A TABLE OF SCREEN CODES TO DO SUCH THINGS AS CLEARING THE SCREEN AND MOVING THE CURSAB`A AB``16K BECOMES RAMDISK I:FERG BRAND 1986 C`d_ MEM 32K RDISK    @P`@ qiɀɐiPi?Hh@  ` A, AA``+B OR. THIS TABLE IS ONLY FOUND IN THE SOFTCARD'S CP/M BIOS. (IT'S KNOWN AS THE SOFTWARE SCREEN FUNCTION TABLE IN THE MICROSOFT SOFTCARD MANUAL, P2-14). THE PATCHES BELOW CREATES AN EQUIVALENT TABLE AT THE END OF THE FILE, AND CHANGES ALL REFERENCES TO TH   AB`A AB``16K PLUS LANG CARD BECOMES RAMDISK H:FERG BRAND 1986 E ORIGINAL TABLE TO USE THE NEW TABLE INSTEAD. NOTE THAT GRAPHICS IS NOT SUPPORTED BY THE PATCHED VERSION. ANY ATTEMPT TO USE GRAPHIC COMMANDS (BOTH LORES AND HIRES) MAY DAMAGE BDOS/BIOS SINCE THE COMMANDS GENERALLY POKE SOFTSWITCHES OR SCREEN MEMORY C:, try the following: DDT APLFLPY.DVR S108 change 06 to 02. This reduces the maximum number of drives this driver can serve from 6 to 2. Save this modified version.) 3. BUFFRAM.DVR -------------- A test to see if tver in another slot, slot 5 say, do the following: DDT SAT128K.DVR ;Change all code like AD 8B C0 to AD DB C0. In general, $8B will become ($8 + $slot num) * $10 + $B. In particular, S144 D4 . S14F WHICH DON'T EXIST ON THE STARCARD. (THEY ARE ACCESSED THROUGH A PORT INSTEAD). O PATCHES CAN BE MADE FROM DDT USING THE S COMMAND, THEN SAVED USING: A>SAVE 96 MBASIC.COM O HERE ARE THE PATCHES: 0CAF:A9 (SEARCH BYTE AT BDOS he directory tracks have been initialized in the ramcard is inserted into the language card tester of BUFFER.DVR. If the ramcard is being used as a ramdisk, BUFFER.DVR is tricked into believing there is no language card. If your ramca DB . S152 DB . S167 DA . S18E D0 . S1AD D3 . S1B0 D3 . S1DA DA . SAVE 3 SAT128K.DVR - 6) 2578:F5 60 (REFERENCES TO THE TABLE) 2593:F6 60 25A0:F6 60 60EB:00 (SHORTEN SIGN-ON MESSAGE TO MAKE SOME ROOM) 60F5:20 1B AA D9 D4 EB EA 1E BD 0B 0C (THE NEW TABLE) IN THE RARE CASE THAT THE SCREErd is in some other slot, you can use either BUFFRAM.DVR or BUFFER.DVR. This driver should be the last one installed as it has to see what ram is left for this purpose. Of course, if you do not want a printer buffer, jIf the ramcard is in slot 0, there could be a problem if both the printer buffer driver and the ramdisk driver both want to use bank 1 of the ramcard. BUFFRAM.DVR should be used instead of BUFFER.DVR. 2. DIGITEK 128K RAMCARD IN SLOT 0 ----N CODES FOR THE STARCARD CP/M HAVE BEEN CHANGED (EG. BY CONFIGSV), THE TABLE AT 60F5 WILL HAVE TO BE ADJUSTED ACCORDINGLY. O OPTIONAL RECCOMMENDED PATCHES TO REMOVE GRAPHIC-SOFTSWITCH POKES: 27E1:00 00 00 27EF:00 udt omit BUFFER.DVR or its variants. The printer will still work. 4. MEM32K.DVR ------------- This driver lets you use $4000-$8000 of APPLE memory plus the language card as a 32K ramdisk, drive H: Do not install a BUFFER.DVR if you----------------------------- Same remarks as for SATURN card. SAT128K.DVR configures the SATURN card as drive G: DIG128K.DVR configures the DIGITEK card as drive J: If you want to change these letters, DDT the driver, then STARCARD NOTES #2 ----------------- FERG BRAND JUNE 1986 RAMDISK DRIVERS --------------- 1. SATURN 128K RAMCARD IN SLOT 0 -------------------------------- (Correction to this section 12 Feb 87) I put this driver after APLFLPY. use this! 5. MEM16K.DVR ------------- For those with a 48K APPLE II+ and no language card. It lets you use $4000-$8000 of APPLE memory as a 16K ramdisk, drive I: Do not install a BUFFER.DVR if you use this!  S106 change from whatever it is to nn, where nn is 06 for G:, 07 for H: and so on up to 0F for P: You can't use A: to F:, these have been commandeered by APLFLPY.DVR. (Oh well if you really insist on calling your ramdisk driveDVR in the INSTALLation but its position is not critical. As long as it goes after SFTVIDEO.DVR and before BUFFER.DVR. It converts the ramcard into drive G: It has the same capacity as a normal disk. If you want to use this dri / L݄ʊ  /Ll K LoA[)? *L_  * ,)?,) @   `  =TY)(jk^q;+*:  $` ` ` `` `$!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I m80y   m]i &^< UT  L)0ix  L "p d LJK`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ @$IB PUUUUU@"A@HD@$IDHHD$" @@@"  @ @H @"@$ HA!$ !  @D$AD@$$ @"I$IIII@$I$I$$$I @ A"@@@@ H&UQ>`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4ζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H $ @ !UUUUUUUUT*`ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO  n o >8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H g APL 16*35 FLPPY      ``PP@@  /   `K8@`JșJL L L  P ` )JJJJL + ` (08@H  .`f   Y  R RV Y `8`SC:SFTVIDEO.ERLA SFTVIDEOERL54Iw6ǀ0 p#`T 0< P8RC!0W;W h W `,ϘHh` `8``lRt) a_l#kLM`JK U0+ NO  Ȍ`LPQ iS`LJK iS L)Lί``8J)JJJJ Q JSR $FDF0 ;Output it. en, keyboard, disk drives, printer, etc. This command is used by DLDRIVER when creating the file DRIVERS, and by DRIVERS when a cold boot occurs. Many parameters must be sent. I do not propose to deal with this. #6 READ one byte from to crash into the APPLE memory to see what was going on there. LD C,02 CALL WRHSTBYTE LD DE,0300 CALL WRHSTWORD LD DE,000E CALL WRHSTWORD LD HL,0126 LD DE,000E CALL WRHSTBYTS This is the COUT1 subroutine in the APPLE's monitor. RET This is program RUNTEST.COM on the disk. With these programs as models, all sorts of things become possible! The next example is very much like the last. EXA APPLE memory. LD C,06 CALL WRHSTBYTE LD DE,nnnn ;nnnn is the address in APPLE memory. CALL WRHSTWORD ;the byte appears in register A. CALL RDHSTBYTE RET This is program C6TEST LD C,03 CALL WRHSTBYTE LD DE,0300 CALL WRHSTWORD RET ;The data is placed immediately after this subroutine. A9 69 8D F2 03 A9 FF 8D F3 03 20 6F FB 00 In 6502 assembly language, it is: LDA #$69MPLE 4. A cold boot program. It is often useful to be able to perform a cold boot from inside CP/M. You may want to boot up a DOS 3.3 disk without switching off the power. With the STARCARD, we first have to get out of the STARCARD .COM on the disk. #7 WRITE one byte to APPLE memory. LD C,07 CALL WRHSTBYTE LD DE,mmmm CALL WRHSTWORD LD C,bb ;bb byte CALL WRHSTBYTE RET This is progra STA $03F2 LDA #$FF STA $03F3 ;$FF69 is the beginning of the APPLE's ;monitor subroutine. JSR $FB6F ;fix up the power-up byte. BRK ;crash. This is program SCRASH.COM (for STinto the APPLE. So we transfer a routine to APPLE memory and execute it. LD C,02 CALL WRHSTBYTE LD DE,0300 CALL WRHSTWORD LD DE,0008 CALL WRHSTWORD LD HL,0126 LD DE,0008 CALL WRHSTm C7TEST.COM on the disk. CHAPTER TWO ----------- HOW THE APPLE TALKS TO THE STARCARD ----------------------------------- The approach is the same. 1. Send command number to the STARCARD. 2. Send any parameters that are requiredARCARD crash) on the disk. These programs will work only with the STARCARD. A Z80 SOFTCARD would not understand what was going on. FOOTNOTES TO CHAPTER 1 ---------------------- 8080 equivalents ---------------- LD C,02 BYTS LD C,03 CALL WRHSTBYTE LD DE,0300 CALL WRHSTWORD RET ;The data is placed immediately after this subroutine. A9 00 8D F4 03 6C FC FF In 6502 assembly language, it is: LDA #$00 . The three important commands are similar. #1 READ from STARCARD memory #2 WRITE to STARCARD memory #3 RUN a subroutine located in STARCARD memory If you have booted with DOS 3.3 or some similar operating 10A8: A0 00 WR1Z80BYTS: LDY #$00 ;Initialize Y. 10AA: 98 LOOP3: TYA 10AB: 48 PHA ;Put Y in stack for safekeeping. 10AC:D1Z80BYTE: LDX SLOTNUM ;Load the slot no. 1091: BD 83 C0 LOOP1: LDA $C083,X 1094: 10 FB BPL LOOP1 ;If bit 7 is 0, there is no byte waiting, system, the STARCARD will need to be reset before these commands can be used. This is done by reading or writing to $C0n5,X ,where X is the slot no. of the STARCARD times 16 (e.g., If your STARCARD is in slot 4, then X is $40. See foo B1 00 LDA (CMDLO),Y 10AE: 20 9A 10 JSR WR1Z80BYTE ;Fetch the byte and send it. 10B1: 68 PLA 10B2: A8 TAY 10B3: C8 INYso loop. 1096: BD 80 C0 LDA $C080,X ;If it is 1, read the byte. 1099: 60 RTS 109A: A8 WR1Z80BYTE: TAY ;Put byte in tnote.). The STARCARD should send back a $5A (the letter "Z" in Z80). In 6502 code: 107F: 40 SLOTNUM: ;Store slot no.*16 here. 1080: AE 7F 10 RESET: LDX SLOTNUM 1083: BD 85 C0 10B4: C4 02 CPY CMDLENGTH 10B6: 90 F2 BCC LOOP3 ;Retrieve Y and see if end of command string has been reached. BCC here serves as a BLT, branch if less than, instruction. 10BY register for safekeeping. 109B: AE 7F 10 LDX SLOTNUM 109E: BD 82 C0 LOOP2: LDA $C082,X ;If bit 7 is 1, the STARCARD has not read the last byte sent, so loop. 10A1: 30 FB LDA $C085,X ;Reset STARCARD. 1086: 20 8E 10 LOOP0: JSR RD1Z80BYTE ;Reads the byte returned (see below). 1089: C9 5A CMP #$5A 8: 60 RTS EXAMPLE 1. Read a message from the STARCARD memory. ;Reset the STARCARD. 1000: 20 80 10 START: JSR RESET ;Set up addresses $00, $01 and $02 with the starting address of the comm BMI LOOP 10A3: 98 TYA 10A4: 9D 81 C0 STA $C081,X ;If it is 0, transfer byte back to A and send it. 10A7: 60 RTS We shall also need ;Is it "Z"? 108B: D0 F9 BNE LOOP0 ;If not, read again. 108D: 60 RET Reading and writing are done by the routines RD1Z80BYTE and WR1Z80BYTE. Thesand string and its length. 1003: A9 40 SENDCMD: LDA CMDLO 1005: 85 00 STA $00 1007: A9 10 LDA CMDHI 1009: 85 01 STA $01 100B: A9 05 LDA CMDLENGTH 100D: 85 02 a routine for sending a string of characters to the STARCARD. I shall follow the pattern and call it WR1Z80BYTS. The starting address of the command string will be stored at $00, $01 (CMDLO, CMDHI) and the length in $02 (CMDLENGTH). e will be present in the APPLE memory, at addresses $B009 and $B00C respectively, only if the STARCARD operating system has been booted. In general, they will not be present, so we shall write them into our program. 108E: AE 7F 10 R STA $02 ;Send the command string. 100F: 20 A8 10 JSR WR1Z80BYTS 1012: 60 RTS ;Here is the command string. As you can tell from the SENDCMD subroutine above, it starts at $1040 andThe code from $107F to $10B8 is the same as that described above. This is the program WRTEST.DOS on the DOS 3.3 side of the disk. To see the results, I suggest that you do the following: Run COLDBOOT on DOS 3.3 disk. 00B: A9 25 LDA CMDLENGTH1 100D: 85 02 STA $02 100F: 20 A8 10 JSR WR1Z80BYTS ;The second command string starts at $1070 and is $3 bytes long. 1012: A9 70 SENDCMD2: LDA CMDLO2 1014 is 5 bytes long. ;1 is the read command. 1040: 01 ;The message begins at $FB58 in the STARCARD memory. 1041: 58 FB ;The message is $2A bytes long. 1043: 2A 00 The code from $107F to $10B8 is the same as that described abovInsert a STARCARD CP/M disk with ZSID.COM or DDT.COM on it. Press any key, as requested. Run ZSID.COM or DDT.COM Examine memory from $8000 using the D(isplay) option. FOOTNOTES TO CHAPTER TWO ------------------------ Other Commands: 85 00 STA $00 1016: A9 10 LDA CMDHI2 1018: 85 01 STA $01 101A: A9 03 LDA CMDLENGTH2 101C: 85 02 STA $02 101E: 20 A8 10 JSR WR1Z80BYTS 1021: 6e. The program RDTEST.DOS on the DOS 3.3 side of the disk takes this a step further and displays the message on the screen. In order to see something really interesting to convince yourself that you are reading the STARCARD, I sugges -------------- There are some other commands. #0 IDENTIFY Asks STARCARD for its identifier string "Z80", rom version (one byte) and serial number (four bytes). Try the program IDTEST.DOS on the DOS 3.3 side of the disk.0 RTS ;Here is the first command string. ;2 is the write command. 1040: 02 ;The message is to be placed at $8000 in STARCARD memory. 1041: 00 80 ;The message is $20 bytes long. 1043: 20 00 ;The first t that you do the following: Boot STARCARD CP/M disk. Run SCRASH.COM described in the previous chapter. Boot DOS 3.3 disk using 6 . (i.e., Don't switch of the power to reboot.) Brun RDTEST.DOS. EXAMPLE 2 #4 WRITE one byte to the STARCARD I/O port. LDA #$04 CALL WR1Z80BYTE LDA #$nn ;$nn is I/O port number. CALL WR1Z80BYTE LDA #$bb ;$bb is byte being sent. RTS part is the program. In Z80 assembly language, it is: LD HL,8010 LD DE,8020 LD BC,0080 LDIR RET 1045: 21 10 80 11 20 80 01 80 00 ED B0 C9 00 00 00 00 ;The secon. Send a routine to the STARCARD and execute it. I shall send a program plus text to the STARCARD. When the program is run, multiple copies of the text appear in STARCARD memory. ;Reset the STARCARD. 1000: 20 80 10 START: #5 READ one byte from STARCARD I/O port. LDA #$05 CALL WR1Z80BYTE LDA #$nn CALL WR1Z80BYTE CALL RD1X80BYTE RTS ;The byte is returned in register A. d part is the text. 1055: 41 50 50 4C 45 20 49 4E 20 41 4F 4E 54 52 4E 4C ;Here is the second command string. ;3 is the run command. 1070: 03 ;The subroutine to be run starts at $8000 in STARCARD memory. 1071: 00 80 JSR RESET ;The first command string starts at $1040 and is $25 bytes long. 1003: A9 40 SENDCMD1: LDA CMDLO1 1005: 85 00 STA $00 1007: A9 10 LDA CMDHI1 1009: 85 01 STA $01 1 Different Slot -------------- If your STARCARD is in a different slot, slot 5 for example, the programs just described will have to be changed. Boot DOS 3.3. BLOAD RDTEST.DOS CALL -151 107F: 50 (Your slot no. D A,C ;If it is 0, transfer the byte from C to A and send it. Remember we always put the byte in register C before calling this subroutine. OUT 0,A RET The APPLE routines which do this are R n = 8 + slot no. of STARCARD. e.g., If STARCARD is in slot 4, then $C0n0 is $C0C0. STARCARD to APPLE: A byte written at I/O port 0 appears at $C0n0. Bit 0 of I/O port 40 (and bit 7 of $C0n3) is set to 1. This bit is cleared to 0 when ttimes 16) BSAVE RDTEST.DOS,A$1000,L$C0 Similarly for WRTEST.DOS. .pa CHAPTER THREE ------------- THE TECHNICAL DETAILS --------------------- APPLE STARCARD --------------------- D1Z80BYTE and WR1Z80BYTE. These were described in chapter two. RD1Z80BYTE: LDX SLOTNUM ;Load the slot no. LOOP: LDA $C083,X BPL LOOP ;If bit 7 is 0, there is no byte waiting, so loop. he APPLE reads the byte. APPLE to STARCARD: A byte written to $C0n1 appears at I/O port 20. Bit 7 of $C0n2 (and bit 7 of I/O port 40) is set to 1. This bit is cleared when the STARCARD reads the byte. The STARCARD routines which --------------------- ! APPLE ADDRESS! !I/O PORT ! ! !---------! ! ! $C0n0!<<< 8 <<>> 8 >>>!20 ! ! !---------! ! ! ! ! ! ! S $he STARCARD has not read the last byte sent, so loop. TYA STA $C081,X ;If it is 0, transfer byte back to A and send it. RTS FOOTNOTES TO CHAPTER THREE ------------------------ NC,RDHSTBYTE ;If this bit is 0, there is no data waiting, so go back to the beginning. IN A,20 ;If it is 1, fetch the byte. RET WRHSTBYTE: IN A,40 C0n2!------ ! S ! ! T (bit 7)! ! ! T ! ! A ! ----!(bit 7) A ! ! T ! !40 T ! ! U ! ----!(bit 0) -- Other Ports ----------- There are other ports not shown in the illustration. On the APPLE side: $C0n5 RESET Read or write to this address resets the Z80 causing it to start again at address $0000. The use of RE RRC ;Puts bit 0 from the status port into the carry flag. JP C,WRHSTBYTE ;If it is 1, the APPLE has not read the last byte sent, so go back to the beginning. L U ! ! S $C0n3! ! ! S ! ! (bit 7)!------ ! ! ! ! ! ! --------------------- --------------------- Notes:SET was described in chapter two. $C0n6 INTERRUPT Read or write to this address can interrupt the Z80 if the CTC (counter-timer circuit - an optional chip that can go into the empty socket in the STARCARD) is installed and set up properly. Initially the interrupts are disabled. This line is connected to channel 3 of the CTC. $C0n7 NON-MASKABLE INTERRUPT Read or write to this address interrupts the Z80 (it is connected to the Z80's NMI pin) causing it to start again at address $0066. On the STARCARD side: I/O port 60 SHADOW MEMORY CONTROL On the STARCARD you can have either ROM or RAM from $0000 to $7FFF. The ROM is turned on at power up and reset. Write 0 to bit 0 of this port switches to RAM Write 1 to bit 0 of this port switches on ROM I/O ports 80,81,82,83 CTC CHANNELS 0,1,2,3