+JJJJ 4`&'x=A \歉) +)V +е+^L   ):BO!yoxg*:BO}!N#F "*#*s#r^ ~!J! J*:o$*C~i6iw**{#zr+s{ozg**͕** ,w͜͸Ͳ!!N#F$**O!~#O: \S*C :qn& ^#V>O^"*}:*)=":O:o"*C *C!ͮ~2~2ͦ:2ͮ:O:w:w |g}o*# 2E>! ^#V w#P:BO|^#V#"##"##"##"!O*!O*|!6ʝ6>*w#w*w#w'û*! J*""!N#F*^#V*~#foyx*{_zW+*x: 2 p&x~+é72 H! >w_: ! 5ͤNkͱ¦ͱxʊ#Nx: ! 2 ͤ! 5™#wO~x½p Hy<< ʑ :!qMD# O͐  :E B 2>: b# : y! 4 5~yy5 6yҐ^H@Oy H H: –ͬ  #H: !  Hù H H $O͐: 2 *CN# ʩw"C{2!"E9"1A22!ty)K!G_^#V*C~E ,&-AGMS!!ô!ô!Bdos Err On : $Bad Sector$Select$File R/O$:BA2!~6=qf^!~2>`~22\!!B!~> >#0~O#Cx2͘1)ͽÂf zͧÆBAD LOADCOMf^: ! Â$$$ SUBÆNO SPACE^ :Ty!B*O=?_s#"^sG!~Ypsp2mÆÆf ͧÆFILE EXISTS _: É: :ʉ=2)ͽÉ T!@k!}|q ͢ØÆ^ BRͧ9!5‚#~Y‚#"T<ÆALL (Y/N)?^ Tʧ͘!6!~ڇ w4!Y~ʆ͌†t=ʆf ^ T 2o&)|+!<ͧ ! ~ 3#0 Wx x ߀ ߂ G ~ # 3x~#B!Y~ɯ2:=!ý:=!:ý^T!~  6?#ˆ:`O> K{͘A͒>:͒͢>:͒͢xK > K > ͒x #~?  xDIR ERA TYPESAVEREN USERw!yO#< Ty#O 321y_͸2y2ͽ:ݷ˜1͘A͌>>͌92^ :¥.!_~#fow]!v"!çREAD ERRORçNO FILE^:#͘*~ "߷"͌#>?͌͘ =_.:;<> O߅o$>!Y2*O"ʉ@G:ʐ:wÖx2p0ʹ#*©6?ëw˜0ï#6 ¹.0#*6?w0#6 #6"  އ!2:2a{_:ʖ:>Ľʖ:=2–!B!6#5ʖ:Ľ!ͬʧ )!F#xʺ~0wëw!" !~6ͽ:ý(!\X COPYRIGHT (C) 1979, DIGITAL RESEARCH _͌> ͒> Ò> Ò͘~#͌ì _2<ݯ2"**#"͕: 2Þy<_WyOxOxG* ~V5dw^ :ʈNÎ N#Fyʝ*}|\#u*#DM*6# x±**s#r͡*6#6^>:A#~$=2Ek͌::/GyO>2!q*C"͡ʔ*JҔ^:Oyʃ?|x | s-|N-# S:2E!~Яw>T D^6k-äPYy 5*{zBK5`*[KH`:K7͜!͜:O!͜:AO !͜K!͜:O!͜02͙:_RA 27!~"O *# Bios Err= D=: T= S= R(etry E(xit A(bort y2x:2:0:8O2!90: Wr^V:OͿ[[:o&))):ƃ_! ~[~*>y:*:_WGOR0:! Ncoi`@>=@>=@0 @8yͷ_ͷWKͿJͿz(@8  {( G@8 .:( *:2*":2:Đ2:ݦg>o[[: >2: : 2":O:(22y!#!: ]0:OͿ*^Vͷ2!90: Rd!: f0:OͿ*^Vͷ:O:26*)Cy2C4>222>242y2 ~2:2*":2:(E=2:! 8!̈́ 0:! '4~ݾ8 6*#"!F6!:<ݾ p22~(>22Fx:(2!~6(+:! !̈́ :!(\(bp_÷bYbK{ṕQOͿJÿzOͿ÷:!a_~:!e::!i::2y2o&)))"! ~(F:L(N{8J:_:OͿ**)"^#fkͷ(!÷ÿ&1`*:G:G:J2222ZXUͿ!ͷw# y !: ͷ)0>2ͷ>22*["*]"!%:OF#xN#N#F#x^#V#!~6# \2|\<3)09CHVÍÛ %*B"ämE 6F1`22222=2!_o!%ͻ>G^*N( !͜!V͜E:M((*P(!\]$6 w#w2\2lZRç):B"*)*)Q;*"E:;:A2AQÓQÜQ*C}/_|/*W}_*"}o|g":ʑ*C6:ʑw:2E**E}DQ>2s+p+q-*C ͥ!!q#p#w*:BOYG}*MD "ã:!Bw!>2*C~=2u:B2~2wE:A*Cw>"!""2B!"!rQQQâ~?ͦ~?rQ*"CQ-Q͜QüQrQ$Q*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>2T*CGͻ:ẅ́n>2;O ^DM;}H>"*C ::ddslO s#r:E͊:==»y==»*Ww#*"͸*:G#š"͸:!w4!iw:Z!E~=26 w ~>2!E5T*C!"C"C!w# F! w͌x2͢*C ~<wʃG:!ʎì 4~ʶ¬:<ʶ$ʶïZͻx>2>2ͻ:!Z2:Eẅ́͊Ͳ> *C ^OT *C~wD -'  -@ͦ~^*C Ox! N!Fwyxʋ>ڋ>*Cw~#+w#w+ɯ2E22i^ *C :~w~͔͔# # $  $!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)h@(LH9LHH/Hh/ H-З( ܸ(& ¸$8 H` *HVDP (ED Z $0x8x D- ܸDD#HIHHHHhHH݌hHhHh݌H6 h Լ ռ ռ ռ`HJ>݌h Hh݌`葠葠ȔЖȔЖȠ   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()!)FG8`0($ p,&"ųųೳŪŪųųij  !"#$%&'()*+,-./0123456789:;<=>?&Y&&Y& 꽌ɪ\8`&&꽌ɪɖ'*&%&,E'зЮ꽌ɪФ`+*xS&x'8*3Ixix&& 8  '  & x)*++`>J>J>VU)?`8'x0|&HhHh VY)'&Y)xꪽ)' `Hh`V0^*^*>&` aI꽌ɪVɭ穐{8 $(Ѷ) @(` ,8``^ڷ1-) շ_ շշ` `Է۷۷ݷ޷ȱⷭԷ)巭跭鷭ط׷ `ڷ۷`ٷ     LK .L .L 泍  泍   泩  wv ` .L .L,0JJ) l L .LHH hhlhh`HJJ)  ޘ )hlѶ`$(LX)`HѶ$(h $a vȱwmmem ȱl . . n qLc`789:L .L LK Hvw. hL vw. .0`! 泍  L?!. 泍mm.L. . 泌m .L. . ! J J  F. <; L )L/llE ` 泅 泅L 泅 泅L 泍hgL 泍zy ` 泅l.00`.` L.`H hLILl.  . 21 34 /0 . 65 $%I` /lllx( ei ,i к /Hl&,h)_R M #l* #l(.L)L Llui)?uvwlk?8=v@>wABC膅\] u;vȭ<vݢQIʈp z } /G.H  F8 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'h 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. 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 withe 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 buSBOOT COM(SCRASH COM)C6TEST COM*C7TEST COM+SFTVIDEPDVR<,-./0123SAT128K DVR4MEM32K DVR5MEM16K DVR6 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 duri 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 ffer 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 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 APPLEMBASIC DOC78STAR DOCCDEFGHIJKLMNOPQRSTAR DOC0STUVWXSTAR2 BAK DRIVERS Z"#$%MUSIC COMSTAR2 DOC9:;ng 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 th !0>20!0~_# E 6502 $NO ROOM FOR THE PAGE 0 $READ ERROR $ DONE! $>2;!O> 2>RAMDISK ID :;! >#z A8w~Oy{Nnguage 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 telile 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 ------------------ݶĚ."9 7~N,!?!~, w,(T~- E!7_7WS</W7[<{zѺ($  |w->~2!?RAM DISK>2>!7>>G:>=2> >2>!7 xn 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 byour 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, 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 l 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 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.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 THSTARCARD 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 lathe 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&i @SEND DRIVER\:!\="!"9̀!"9!~̀!5o*9^VSͯ^VSͯͺʴ^Vͯͺ *9[͚*<<<":O:̚[~ 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 i 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@@( 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 scre08did08 i 0 6~ 6 6` L9`` U   U8 Là0l `L `hhLC`MOD FOR SAT CARDR I` I`+B AB`A AB``DIGITEK 128K CARD IN SLOT 0 BECOMES RAMDISK J:FERG BRAND 1986 +2* LE&  ' (21  R0 /`56x i,,(`lC`L9 ` 9 `34x ,,(`lE``7 ` 7 `),,`J,,`,@    AA A@A!@"$$$$ I$@BBBB!$$IH@@  ! " $I$$$$ I IH @@ t PRINTER BUFFERdltt@qЁЂ_ .25.5.75K Printer Buffer in use.  ,a0,b0 &z HH,`344?`;G; H3I4J7K? LCMD`NEOF`H )_C, } h(lz # #G G-/`GKm8I΍iح)~NnNn1 Z  Clpk DIG 128K CARD   / Ѕ`@8HJJꎄh)i q@  ` A, AA` `NTYVSL}`L} ~`~ ~`` ```P`LELJ,a ,b }LE1  2ĩ1 4635 79z):/-.0,&-//L1./'{|&}'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  . ` L0 l QL yL0i( hL08( uL0i hL08 uL0IL5IL5IL5IL5IL5IL5 ;U  Q    LL ;K  QL5 ;P  Qhe 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 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}[]~@^] PNM HHH hhh(` ` ` L9`,)H 0h` )L{  )`ȹ Ȅ ! `̿`yȊL8` H& i e 8 h  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 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 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 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 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 Ȍ` `   ` LJ`  ``;```a{8 `  bV6J>ny5 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 tllowing: 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 . ,0L Q͒[,aI0 c0=  Q ͒  Li . !  L,a nL,b vL&c0! .(  LILA [i L͓ !`ll!'-/()<>"1789,.2|`_\{}[]~|`{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 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 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 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 = ^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$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 r >? 轎 莉  轎 轎 莉 $  ~  L    L  H^ n hi@ n L  5 `    = \ ~     0 U  z    ^X EXIT ALTER MODE 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 forytes 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. {!&{ɢ|}`~ {`` {`H0h`$$55\\$$55\$$55\$$55\\ead 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 fR1. 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 ^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 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, ++PPW ++ ++ ++PPW 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 n o >8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H /)-H h  l  8``ll`L! La L LLLL   1  !`  ```   MȽ`  `` HH  h -------- 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`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ ! ! !---------! ! ! $C0n1!>>> 8 >>>!20 ! ! !---------! ! ! ! ! ! ! S $ister*/ return(calla(0xFFE0,0,0,0,0)); /*Runs RDHSTBYTE and returns with the status byte in the A register*/ } stdatard() { calla(0xFFE3,0,0,6,0); calla(0xFFE9,0,0,0,0xC0AF); return(calla(0xFFE0,0,0,0,0)); /*Read" hh"`0LYH h `H  i9h`HiN  h`LH HH  hh hlHH:J/80* 8hHH YhLhhLY  ,Q,T` q  8 8LL h  `l  $ 9`` L*  k` { jmki) ``,L,`P@0 p`P@0L,Xx)xL,Yx @x0L L    "HH ne 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ζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H(<- 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)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 / L݄ʊ  /Ll K LoA[)? *L_  * ,)?,) @   `  =TY)(jk^q;+*:  $` ` ` `` ` --------------------- ! APPLE ADDRESS! !I/O PORT ! ! !---------! ! ! $C0n0!<<< 8 <<`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4ything. 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 code$!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I)8jmT`ii  5` à0l !"#$%&'()*+,- Pm 8mȌ1 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 SOlot 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`ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO . 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 STARCARD 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 m80y   m]i &^< UT  L)0ix  L "p d LJKFTCARD. 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 @I$@" IHB@HHB@ $ I@!!@$@ @@! @$ *$@ H$$A$A$! IHB$@$$IH(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 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 a 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. USIated 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? Usleads 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.) king area. S1A70 C0 01 D0 02 A9 05 99 6D 8F 60 . ;This is just 6502 code. C0 01 CPY #$01 ;Are we 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 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 loNG 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 ree 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 aroundTo 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 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 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 reinstcks 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 ;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 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 `NTYVSL}`L} ~`~ ~`` ```P`LELJ,a ,b }LE1  2ĩ1 4635 79z):/-.0,&-//L1./ $ @ !UUUUUUUUT* 20 A8 FC JSR $FCA8 AD 00 C0 LDA $C000 ;Test for other key. 30 0D BMI A ;Branch if one was pressed. AD 94 00 LDA $0094 ;Change contents from $00 to $FF or v.v. 49 FF EO t PRINTER BUFFERdltt@qЁЂ_ .25.5.75K Printer Buffer in use.  ,a0,b0 &zrite over it. Not quite so elegant. ZSID B:SFTVIDEO.DVR ;JSR to working area. S501 20 FB 09 . ;Control key test routine. If the control key was pressed all by itself, change the contents of $0094 from $00 to $FF ί``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,,`, AA A@A!@"$$$$ I$@BBBB!$$IH@@  ! " $I$$$$ I IH @,`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 `!&ɩ `!&ɩl!&ɩi o 2 ) 1977, DIGITAL RESEARCH ZSID VERS 1.4$1/ !~=W!xe ~#Xbxʇ {z~#o}o҃i.*"#":2222!=8J9(PFC) 1977, DIGITAL RESEARCH ZSID VERS 1.4$1/ !~=W!xe ~#Xbxʇ {z~#o}o҃i.*"#":2222!=8J9(  SOFT VIDEO ԩ     (<(P@@(" hh"`0LYH h `H  i9h`HiN  h`LH HH  hh hlHH:J/80* 8hHH YhLhhLY  ,Q,T` q  8 8LL ɉ >? 轎 莉  轎 轎 莉 $  ~  L    L  H^ n hi@ n L  5 `    = \ ~     0 U  z    ^X EXIT ALTER MODER I` I/)-H h  l  8``ll`L! La L LLLL   1  !`  ```   MȽ`  `` HH  h  . ` L0 l QL yL0i( hL08( uL0i hL08 uL0IL5IL5IL5IL5IL5IL5 ;U  Q    LL ;K  QL5 ;P  Q = ^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 ^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 ,0L Q͒[,aI0 c0=  Q ͒  Li . !  L,a nL,b vL&c0! .(  LILA [i L͓ !`ll!'-/()<>"1789,.2|`_\{}[]~|`{h  `l  $ 9`` L*  k` { jmki) ``,L,`P@0 p`P@0L,Xx)xL,Yx @x0L L    "HH L5 ;Z  Q   WLL ;L0 34 4 43 ` Ly   `HHH "i( ~ 5 hhh`HHH "hhh`(>? `H h ~ L 1 Z (<- 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) Ȍ` `   ` LJ`  ``;```a{8 `  bV6J>ny5 }[]~@^] PNM HHH hhh(` ` ` L9`,)H 0h` )L{  )`ȹ Ȅ ! `̿`yȊL8` H& i e 8 h  / L݄ʊ  /Ll K LoA[)? *L_  * ,)?,) @   `  =TY)(jk^q;+*:  $` ` ` `` `(08@H  .`f   Y  R RV Y `8`m`SC:SFTVIDEO.ERLA SFTVIDEOERL54Iw6ǀ0 p#`T 0< P8RC!0W; n o >8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H  $ @ !UUUUUUUUT*&UQ>`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ $!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I @I$@" IHB@HHB@ $ I@!!@$@ @@! @$ *$@ H$$A$A$! IHB$@$$IHW h W `,ϘHh` `8``lRt) a_l#kLM`JK U0+ NO  Ȍ`LPQ iS`LJK iS L)L`ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO ζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H@$IB PUUUUU@"A@HD@$IDHHD$" @@@"  @ @H @"@$ HA!$ !  @D$AD@$$ @"I$IIII@$I$I$$$I @ A"@@@@ H m80y   m]i &^< UT  L)0ix  L "p d LJK)8jmT`ii  5` à0l !"#$%&'()*+,- Pm 8 pȌClpk SAT 128K CARD   / Ѕ`@8HJJiih)i q@  ` A, AA`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 THAB`A AB``16K BECOMES RAMDISK I:FERG BRAND 1986 P/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 S`+B AB`A AB``SATURN 128K CARD IN SLOT 0 BECOMES RAMDISK G:FERG BRAND 1986   C`d_ MEM 32K 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 CURSC`d_ MEM 16K RDISK    @P`@ qiɀɐiPi?Hh@  ` A, AA``+B HHDOWNLOADED 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   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 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! ----------------------------- 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 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 rd 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, j DB . S152 DB . S167 DA . S18E D0 . S1AD D3 . S1B0 D3 . S1DA DA . SAVE 3 SAT128K.DVR 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 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 t 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 driveSTARCARD 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.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 youIf 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 ----- 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 SCREEhe 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 ramcaver 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 DVR 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;+*:  $` ` ` `` `ί``8J)JJJJ Q8?(  h`   `8(i``` LȊ)xxxx`` l ``J )?(>H  $ @ !UUUUUUUUT*&UQ>`Dp(`PG ` )ɀ0  `OL ` )&Lm ìLȌ ȱL L5 4`  ``````'`8{ E`8`(!)" ίή` q d``i78Li""i8(  `nHoHpnqohohn = `HH8 ζ $!H IB IB!D $I @B!RJ)%R @$  I!$H@@    $@@   !A$@H @@BB A I @I$@" IHB@HHB@ $ I@!!@$@ @@! @$ *$@ H$$A$A$! IHB$@$$IHW h W `,ϘHh` `8``lRt) a_l#kLM`JK U0+ NO  Ȍ`LPQ iS`LJK iS L)Lg APL 16*35 FLPPY      ``PP@@  /   `K8@`JșJL L L  P ` )JJJJL + ` `ȱ %l ` 43 N4I3D56 75ٙ6ٝ 7i```8H<8Hq`~    '    <  Y  u WrO ζhh` L8 ((8` S h` n o ` >?8 (`8` c) @` L` `  ` >?(`H@$IB PUUUUU@"A@HD@$IDHHD$" @@@"  @ @H @"@$ HA!$ !  @D$AD@$$ @"I$IIII@$I$I$$$I @ A"@@@@ H m80y   m]i &^< UT  L)0ix  L "p d LJK)8jmT`ii  5` à0l !"#$%&'()*+,- Pm 8 Ȍ D!@@@ H @DH H@$AEile 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 ------------------ `NTYVSL}`L} ~`~ ~`` ```P`LELJ,a ,b }LE1  2ĩ1 4635 79z):/-.0,&-//L1./your 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, AA A@A!@"$$$$ I$@BBBB!$$IH@@  ! " $I$$$$ I IH @ t PRINTER BUFFERdltt@qЁЂ_ .25.5.75K Printer Buffer in use.  ,a0,b0 &z+2* LE&  ' (21  R0 /`56x i,,(`lC`L9 ` 9 `34x ,,(`lE``7 ` 7 `),,`J,,`,the 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@   '{|&}'HhHLC:J h Kx40/0&0!HUULHU((HIK } ` ` 645379 t COMMUNICATION BETWEEN STARCARD AND APPLE ---------------------------------------- ---------------------------------------- FERG BRAND JUNE 1986 INTRODUCTION ------------ When the STARCARD* is operating, you have two computers (08did08 i 0 6~ 6 6` L9`` U   U8 Là0l `L `,`344?`;G; H3I4J7K? LCMD`NEOF`H )_C, } h(lz # #G G-/`GKm8I΍iح)~NnNn----------------- Let us look in detail at the way the STARCARD communicates with the APPLE and create some short prorams which will serve as models for your more ambitious attempts. Much of the hard work has been done for us and EXAMPLE 3. Send a routine to the APPLE to beep the speaker and then run it. ;This first part is almost identical to the first part of the last example. LD C,02 CALL WRHSTBYTE LD DE,0300 CALL WRHSTWORD all the parameters it requires, but the STARCARD is not yet ready. ;$3000 is the starting address in the STARCARD memory where the data will be deposited. ;$0008 is the number of bytes (again). ;To set up the STARCARD and then ten 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 bB is the starting address of the message. I assembled the program starting at $0100 and the data began at $0111B after the final RET. ;$E is the number of bytes (again). ;To send the message call WRHSTBYTS. LD HL,011B LD LD C,01 CALL WRHSTBYTE Of course, if you are using ZSID or DDT, you type in the address of the subroutine, $FFE3 (see above), not its name. ;$FBO9 is the starting address in the APPLE memory. ;To send this one word to 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 importantferent subroutines. The program on the disk RDTEST.COM takes this a step further and, after removing bit 7 from each byte, prints the data on the screen. EXAMPLE 2. Send a sentence to the APPLE text screen. ;2 is the write commll the APPLE to send the data call RDHSTBYTS. LD HL,3000 LD DE,0008 CALL RDHSTBYTS ;That's all there is to it except to return. RET It is easy to see from this example how the parameters are set for the difyte to the APPLE WRHSTWORD at $FFE9 writes one word to the APPLE WRHSTBYTS at $FFEF writes a number of bytes to the APPLE (I have used the official STARCARD names for these subroutines. The HST refers to the host computer, DE,0013 CALL WRHSTBYTS RET ;Message C8 C5 CC CC CF A0 C6 D2 CF CD A0 D3 D4 C1 D2 C3 C1 D2 C4 You will have to switch to the 40-column text screen to see the result. This is program WRTEST.COM on the disk. the APPLE, load it into DE and call WRHSTWORD. LD DE,FB09 CALL WRHSTWORD ;$8 is the number of bytes we are fetching. Express it as $0008, i.e., a full word. LD DE,0008 CALL WRHSTWORD ;The APPLE has 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 iand. LD C,02 CALL WRHSTBYTE ;$428 is the beginning of the ninth line on the APPLE text screen. LD DE,0428 CALL WRHSTWORD ;$E is the length of the message. LD DE,0013 CALL WRHSTWORD ;$011f you are using DDT, I'll point out the relevant differences between Z80 and 8080 code in a footnote at the end of the chapter. ;1 is the read command ;To send this one byte to the APPLE, load it into register C and call WRHSTBYTE. i.e., the APPLE computer.) EXAMPLE 1. Read from APPLE's F8 ROM and deposit it in the STARCARD memory starting at $3000. I used ZSID, a Z80 version of DDT, and wrote these in Z80 assembly language using the A(ssemble) option. I LD DE,0006 CALL WRHSTWORD LD HL,0126 LD DE,0006 CALL WRHSTBYTS ;3 is the run command. LD C,03 CALL WRHSTBYTE ;The subroutine starts at $0300 in APPLE memory. ;To execute it call WRHSTWm 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 required 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 STMPLE 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 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 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 ORD. LD DE,0300 CALL WRHSTWORD RET ;The data is placed immediately after this subroutine. A9 87 20 F0 FD 60 In 6502 assembly language, it is: LDA #$87 ; JSR $FDF0 ;Output it. 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 screARCARD 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 into 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 WRHST.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 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 #$69This 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. EXAen, 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 STA $03F4 ;This will ensure a cold boot. JMP ($FFFC) ;Reset. This is program SBOOT.COM (for STARCARD boot) on the disk. EXAMPLE 5. Crash into APPLE memory. I found it handy, when investigating the STARCARD to be able 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 and 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 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 LDA $C085,X ;Reset STARCARD. 1086: 20 8E 10 LOOP0: JSR RD1Z80BYTE ;Reads the byte returned (see below). 1089: C9 5A CMP #$5A 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. 10Bso 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 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 10A8: A0 00 WR1Z80BYTS: LDY #$00 ;Initialize Y. 10AA: 98 LOOP3: TYA 10AB: 48 PHA ;Put Y in stack for safekeeping. 10AC: 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). ;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. Thes8: 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 commY 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 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 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 INYD1Z80BYTE: 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, 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 and #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. 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 secont 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 -------------- 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.: 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: 6 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 abovThe 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. 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 . 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: #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 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 e. 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 suggesInsert 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 Commands00B: 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 1014JSR 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. -- 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 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 ! ! !---------! ! ! $C0n1!>>> 8 >>>!20 ! ! !---------! ! ! ! ! ! ! S $ LDA $C080,X ;If it is 1, read the byte. RTS WR1Z80BYTE: TAY ;Put byte in Y register for safekeeping. LDX SLOTNUM LOOP: LDA $C082,X ;If bit 7 is 1, the 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 whichtimes 16) BSAVE RDTEST.DOS,A$1000,L$C0 Similarly for WRTEST.DOS. .pa CHAPTER THREE ------------- THE TECHNICAL DETAILS --------------------- APPLE STARCARD --------------------- 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 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. LC0n2!------ ! S ! ! T (bit 7)! ! ! T ! ! A ! ----!(bit 7) A ! ! T ! !40 T ! ! U ! ----!(bit 0) 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 ------------------------ do this are RDHSTBYTE and WRHSTBYTE. We used these before. Now let us look at these in detail. RDHSTBYTE: IN A,40 RLC ;Puts bit 7 from the status port into the carry flag. JP --------------------- ! APPLE ADDRESS! !I/O PORT ! ! !---------! ! ! $C0n0!<<< 8 <<