íEíCfÃçü       Initializing Media      esired program.  Voila`!  Like magic, Wordstar 
(or Mex, or VDE, etc.) would appear on your screen ready to go.  
For the remainder of this article, I will use MEX as the example 
program.

Unfortunately, the means of creating a self-booting program 
required one to actually change some bits in the CP/M program 
code.  This scared a lot of people, this writer included, even 
though the process was usually thoroughly described in a step by 
step process.  Ralph Mason, for example, authored a fine aFIRST DIR  Uªÿ BOOT       DIRECTORY  ØSELFBOOTATupgrdetextAHYPERCARDAŽBACKUPSAFT!ùserialmodA"

€TECH1wspAT,OTECHstartA=aDriveCheckABìEOS_WSAEFTEuFILERpatchAMFDeluxeAEFTQ‚SCRN_COLORAX^IOPORTSApB·[øWCOLORBASAB·]WblockpeekA^wSB2_notesH_SHELLGAMEAkhappen.

One of the many great features of Tony Morehen's TDOS 4.5 is the 
ability to create a submit (batch) file that will automatically 
be executed when the system is booted.  In the world of MS-DOS, 
this is called the AUTOEXEC.BAT file.  In TDOS, the filename is 
PROFILE.SUB.  When TDOS is booted, it looks for PROFILE.SUB on 
the A drive.  If PROFILE.SUB is there, TDOS executes it.  If not, 
no big deal, the screen comes up with the familiar A0> prompt.  
For those without a hard drive, this             CREATING SELF-BOOTING PROGRAMS USING TDOS

                         by Jack MacKenn

During the past few years, various members of the Adam community 
have developed methods for creating self-booting CP/M programs.  
The purpose is to provide a convenience in allowing an Adamite to 
automatically start a CP/M program (Wordstar, Mex, VDE, etc.) by 
inserting the desired media into the A drive and pulling the 
reset switch.  The CP/M system would be read in followed 
immediately by the drticle 
on how to do it using Newsweep (I believe) that appeared in the 
AWAUG newsletter a few years ago.  Ralph demonstrated his method 
at an AWAUG meeting and, following his instructions, I was able 
to create a self-booting program.  One weekend, when I felt bold, 
I was even able modify the CP/M code using venerable old Uncle 
Ernie's Toolkit.  It worked, but code modification isn't a 
process that the average user feels comfortable performing.  When 
one starts modifying code, bad things can àMSDOSvsCPMAq–DDPMODAEFTtEezfprintATw8ezfmergeAT{ezfcopyAFTSURGEALEFT€)ezFILERAFTƒREADme1STH“ADAMvideoH•!BLOCKS LEFT˜ÿinformation can be used to 
create self-booting programs.  

The first thing that's necessary is that your A drive must be a 
tape or disk drive.  If you have a ram drive, the TDOS 
installation program gives you the option of installing the ram 
drive before or after the disk and tape drives.  If you want 
self-booting programs, the ram drive must be installed AFTER your 
tape and disk drives.  

Next, put TDOS on your MEX disk (FORMAT /S from your TDOS 
utilities) or put your MEX files on a TDOkI have scored considerable success.  Armed with "The Hacker'sGuide to ADAM Vols. I and II", a self-written unassembler (inSmartBASIC 1.0), and lots of patience, I have managed to do thefollowing:(1)  create an unassembly listing of EOS-5, with complete com-ments on -every- instruction, data tables expanded and explained,and summaries of what all the EOS function calls do, and howto call them.(2)  create an unassembly listing of EOS-7.  I never finishedwading through the I/O improvements, so I doting programs can be created 
the same way, just substitute the name of the desired program for 
MEX.  Although I used disks in the example, the process works the 
same for tapes.  You can use this method to create a library of 
your favorite programs, each self-booting.

Try it.  It's easy to do, you can't louse up your system, and 
you'll make your friends who still insist on using plain vanilla 
CP/M or the Exceptionally Obfuscated System envious.

                      ********************
nto memory a little at a time for debugging, isavailable either as the 3 source programs (with all the DATA)or a BSAVEd file which can be BLOADed from the interpreter.I'm not really finished with this, since I haven't had timeyet to implement some of my wish list, like RENUM, or bringover Ben Hinkle's sound and sprite commands from "Hacker'sGuide Vol. II".  I put into this the commands I wished I'dhad while trying to make these improvements!(5)  The development which made all this possible was togNewsgroups: freenet.sci.comp.adam.generalFrom: rfd@po.CWRU.Edu (Richard F. Drushel)Subject: EOS and SmartBASIC 1+2 Technical HelpDate: Fri Oct 12 18:46:41 1990Hello, is anybody out there?I inherited my ADAM from my dad 3 years ago, after he go sick ofall the software bugs and ended up purchasing a Tandy 1000 PC.I took on the ADAM as a programming project, for my spare time(not that a Ph.D. student in biology at CWRU with a wife and 2small children should have a lot of "spare" time), and I thinS formatted disk (by 
default, the TDOS FORMAT utility installs the system when it 
formats the media).  Then, using an ASCII editor (VDE, Wordstar 
non-document mode, or the ever popular NT.COM), create a file 
called PROFILE.SUB. The file should contain only one line; MEX 
<cr> (that's an actual carriage return).  Ensure PROFILE.SUB is 
on your MEX disk.  That's it!  Every time you put your MEX disk 
in the A drive and pull the reset, TDOS 4.5 will load followed 
immediately by MEX.  Other self-boon't have commentsfor this part of the code.(3)  create an unassembly listing of SmartBASIC 1.0 and2.0 (including the 2.0 segment which gets put into expansionRAM if you have te 64K expander).  This has few comments,since it was the working document for ....(4)  expanded command and function capabilities for Smart-BASIC 1.0.  I have added a second primary word table andsecondary word table, so the improvements don't come at a lossof existing commands.  This enhancement, hand-assembled andpoked i
 et the data OFF the ADAM and onto a system with more speed,memory and storage space.  I did this by discovering that160K floppies can be read by IBM PCs if you provide a tableto map 1024-ye ADAM blocks to 2 constituent IBM sectors.I wrote a BASIC program on the IBM PC which had an 8086machine code interface to do the setup, the absolute disksector reads, map the sectors, add line feeds (ADAM doesn'tuse them), etc.  This program interprets ADAM's directoryand allows you to copy any ADAM file to a PC          leap year handler.BLREAD drive,block,transfer addressBLWRITE drive,block,transfer address      These have been on my                                          wish list for a long                                          time!  Read and write                                          absolute disk/tape blocks.                                          The drive numbers are the                                          same as the Dn syntax (e.g.                                          5=disk  allow you to move acorrected binary file back to ADAM's environment.  (In caseyou're wondering why I didn't just use a modem, the answeris I ain't got one!)I don't know if this is the place for this, but I'd like tolist the SmartBASIC 1.0 commands and functions which I'veadded.  (Sorry, the 1.0 I/O for random access, etc. isunchanged.  I hoped to be able to take the debugged codeout of 2.0, but again I haven't gotten to it yet.)******** NEW COMMANDS FOR SmartBASIC 1.x ***************************                     the loop, then executes subsequent state-                      ments until it comes to WEND.  If the                       condition is now true, the loop is over;                       if it's false, control passes back to the                      next statement after WHILE.  WHILE...WEND                      loops may be nested up to 10 levels;                      beyond that elicits a "Stack Overflow" error.LINPUT ["prompt";] stringvariable   Gets an entire line of text, in-you are in either TEXT31 or TEXT40,           the old command TEXT keeps you in wwhichever           mode you've selected.  If you're converting           old programs, this saves you having to change           every TETto TEXT40.  One line at the start           is sufficient.TIME hh:mm:ss   I have stolen time from the video inter-                rupt to keep a system clock, with day,                month and year rollover.DATE mm\dd\yyyy   sets the system date from 1983 on.  Sorry, no         disk.  So onmy ADAM, I used my SmartBASIC unassembler to create a textfile.  I then put the ADAM disk in the PC and copied the fileto a machine with a hard drive.  I then used PC editorsto clean up the text, resolve nasty Z80 programming trickslike overlapping entry points into code, and display datatables.  I ultimately hoped to reconstitute the source.ASM files so programmers more skilled than me could moreeasily fix all the bugs.  I haven't written the IBM-to-ADAMprogram yet, though, which would1).LOCATE row,column    This is a MicroSoft BASIC command, easier                     to use than HTAB and VTAB.CLS   A MicroSoft BASIC synonym for HOME.PUT nn      s his in file I/O to get control codes into the            file.  You can also use it as an equivalent to            PRINT CHR$(nn);WHILE conditionWEND                  This is another MicroSoft BASIC program-                      ming structure which is very useful for                      loops.  On entry, it notes the start of ***TEXT31     Selects 31 column text mode (ADAM's default).TEXT40     Selects 40 column text mode.  FLASH and           INVERSE work as in TEXT31.  You cannot, how-           ever, set unique inverse foreground and           inverse background colors like in TEXT31.           Fear not for compatibility with old programs           which make POKEs to set the colors -- I've           managed to leave the patched code in such a           state as to be able to utilize these.           Note:  once                                     cluding commas.RETURN line #   Allows you to RETURN from a GOSUB to any line                you want, not just to the statement after             GOSUB.RESTORE line #  Allows you to RESTORE to any DATA line you                want.RANDOMIZERANDOMIZE nnnn,nnnn    RANDOMIZE reseeds the random number                       generator from the current system time.                       Optionally, you may specify 2 integer                       seeds (each 0<=nnnn lets you determine the status             of your call.EOS-5 and EOS-7 error codes.   0   (No Error)   1   Non-Existent Device   2   Device Not Ready   3   I/O Not Over   4   No Date Set   5   File Not Found   (Due to what seems to be a typographical       File Not Open    error in programming, 2 different errors                        are assigned to code 5, but none to code                        15.  One of these should be code 15.)   6   File Already Exists   7   Too Many Open Files   8 now!CALL EOS(nn)   This allows you to make calls to EOS by function               number.  The function number is simply the offset/3               into the EOS jump table at 64560. Regser setup is               provided by the definition of special system variables,               which may be set and then read following the CALL:              [regvar]=nnnn  where regvar is one of AF, BC, DE, HL, IX, IY               and nnnn is a 2-byte integer.  Remember that               words are stored lobytes not conflict with any assignments          for PR #n in SmartBASIC 2.0 (which allocates its own          parallel and serial ports).PR # assignments in SmartBASIC        v1.0        v1.x           v2.0   0  screen      screen         screen   1  ADAM daisy  ADAM daisy     ADAM daisy   2  screen      screen         ADAM serial   3  screen      PIA2 parallel  screen   4  screen      screen         ADAM parallel   5  screen      screen         screen   6  screen      screen         screen   7     ZF or CF     These are read-only status registers for the             zero flag and carry flag, respectively.  This             function reads the F "register" (see above)             set upon the return from a CALL EOS(nn).  These             return 1 if the flag was set (Z, C), 0 if the             flag was clear (NZ, NC).  EOS sets ZF if the             requested function call terminated successfully,             clear if it failed.  If it failed, AX has an error             code 1-24.  This<=65535).RESUME #    RESUME to any line number you want after an error.            By the way, the original v1.0 handling of errors            during ONERR was totally bollixed.  The stack            was not cleaned up from the call to ONERR, so            if your error recurred too many times, you blew            up the stack and locked up the system.  [I have            had directories trashed by the execution of            random code following one of these mishaps.]  It's            all fixed   Match Not Found   9   Bad File Number   10  I/O Past End   11  File Too Big   12  Directory Full   13   No More Room (or Disk Full)   14  Bad File Name   15  (unused.  see error 5 above.)  16  File Locked   17  Bad I/O Mode   18  Z80A Not In Synch   19  Master 6801 Not In Synch   20  File Access Denied   21  (unused)   22  I/O Error   23  Incorrect EOS Version (or Advanced Feature)   24  Non-EOS VolumePR #3     Is set up for the Orphanware PIA2 parallel printer          driver.  This doe, hibyte, so to set A=1               and clear all flags, nnnn=1 (hex 0001).               WARNING:  DO NOT USE THIS COMMAND TO BANK-SWITCH MEMORY!               Proper execution of SmartBASIC commands requires both               32K be switched in simultaneously.  Bank-switching can               only be accomplished by a machine code routine which (1)               lies exclusively in one 32K bank and (2) which either               doesn't use the stack or else sets up its own stack.            screen      screen         screenIN # assignments in SmartBASIC      v1.0 and v1.x      v2.0   0    keyboard       keyboard   1    keyboard       keyboard   2    keyboard    ADAM serial   4    keyboard       keyboard   4    keyboard       keyboard   5    keyboard       keyboard   6    keyboard       keyboard   7    keyboard       keyboardPRWIDTH=nn set the column width of the printer.PROMPT=nn   set prompt to CHR$(nn).COLOR(n)=nn   set COLOR of various screen attributes:                 0       3  current shape table address           A command like ADDR(3)=ADDR(2) resets the shape           table address to its original setting (the box).COLOR(nn)   Tells you current settings for:               0  COLOR               1  HCOLOR               2  border color               3  normal text color               4  normal background color               5  inverse text color               6  inverse background color               7  GR, HGR, HGR2 graphics screen colorNote:  setting a cLOMEM                 2  undefined                 3  HIMEMADDR(nn)=nnnn  Set shape table address and USR address.                  0  undefined                  1  shape table               2  undefined                  3  USR address&    This is now set up as a synonym for REM (since that's all anybody     ever used ot for, anyway).STORE variableRECALL variable   These useless commands now function as in SmartBASIC                  2.0 -- which is to say, they do nothing at all.  [In        screen (31 or 40)               1  printerVER(nn)  Gives you versions of:            0  EOS (5 or 7)            1  SmartBASICBIT(nn,variable)=xx    Test whether bit nn (0-7) of variable                       (or number) is set (1) or clear (0).                       Returns 1 (set) or c0 (clear)SET(nn,variable)    Returns value of variable with bit 0-7 set.                    variable is unchanged.RES(nn,variable)    Returns value of variable with bit 0-7 clear.                    variable ent himem           The use of this in statements like MEM(1)=MEM(0)+1024           allows you to write relocatable machine code for           your SmartBASIC programs, so you don't havet           worry whether the latest patched version of SmartBASIC           will occupy the space where you're putting your           machine code.ADDR(nn)   Tells you current settings for:              0  default USR address              1  current USR address              2  default shape table address         COLOR color                 1  HCOLOR color                 2  border color                 3  normal text color                 4  normal background color                 5  inverse text color                 6  inverse background color                 7  GR, HGR, HGR2 graphics screen color              nn is the TI color number from 0-15.MEM(nn)=nnnn  Set LOMEM and HIMEM (alternate syntax--see              my section on new FUNCTIONS for why).                 0  undefined                 1  olor with COLOR(nn)=nn is PERMANENT across TEXT,TEXT31, TEXT40, GR, HGR, HGR2 commands!  I've patched the codeso these don't get reset each time.Also note:  I chucked the TI-to-Appl olor code mapping.  Itonly keeps you from getting about half the colors the TI chipcan give you.  Use 0-15 for TI colors.SPEED    Returns current SPEED.ROT    Returns current ROT for DRAW and XDRAW.SCALE  Returns current SCALE.PROMPT  Returns current PROMPT.WIDTH(nn)   Gives you current width of:               0            v1.0 there was some spaghetti code associated with                  these, which did nothing but occupy space I've since                  put to better use. ******** NEW FUNCTIONS FOR SmartBASIC 1.x *****************************These are numeric or string quantities which can be usedin mathematical or conditional statements.MEM(nn)    Tells you the current settings for:               0  default LOMEM               1  current lomem               2  default HIMEM               3  curris unchanged.AND(var1,var2)   Returns logical AND of var1 and var2.  var1 unchanged.OR(var1,var2)  Returns logical OR of var1 and var2.  var1 unchanged.XOR(var1,var2)  Returns logical XOR of var1 and var2.  var1 unchanged.CPL(variable)  Returns complement of variable (swaps 1s and 0s).               variable unchanged.DATE$   Returns system date as a string, e.g. "12-OCT-1990".TIME$   Returns system time as a string, e.g. "22:13:06"DATE(nn)  Returns components of date as numbers:            rray11  Divide by Zero12  Type Mismatch13  String Too Long14  Formula Too Complex15  Undefined Function16  Incorrect Function Usage17  Illegal Mode18  INPUT/LINPUT    (This code was allocated, but the error string                     was set to null.  I have restored a message.)19  Break   (^C pressed during program execution) 20  Break21  Can't Continue22  WHILE without WEND     (was unused)23  Range Error24  Write Protected25  End of Data26  RESUME without ONERR   (was unused)27  File Nos             2 hex digits, with a leading zero if necessary             (e.g. 23 decimal=17 hex; 12 decimal=0C hex).  If             256<=nnnn<=65535, the string is 4 hex digits,           again with leading zeros (e.g. 256 decimal=0100 hex).SPC$(nn)     Returns a string consisting of nn spaces (nn<256).STRING$(nn,x)  Returns a string consisting of x character nn's               (e.g. STRING$(32,5)=5 spaces=SPC$(5)).  You can               use things like STRING$(ASC("*"),5) if you              n't).(6)  I also changed the screen LIST routine to get rid ofall those extra spaces!  At 31 columns, looking at:     IF n = 25 * cost / INT (x / y) THEN  GOSUB 2040drove me buggy when editing long programs.  About all it was goodfor was inserting something into a multi-line statement; you didn'thave to worry about losing the right-most characters when insertingchanges.  I, however, prefer looking at a compact screen.  I thinkit's a nice patch, especially in TEXT40.(7)  I fixed the KEYBOARD ENTRY(1) where it gets the next randomnumber in the sequence.(2)  I never liked the irrational error codes.  SmartBASICactually uses an internal set numbered 1-35.  So I rewrote ERRNUM to retunSmartBASIC's internal codes instead ofthose (presumably) AppleSoft things.SmartBASIC 1.x internal error codes.0   NEXT without FOR1   Syntax2   RETURN without GOSUB3   Out of DATA4   Illegal Quantity5   Overflow6   Out of Memory7   Stack Overflow8   Undefined Statement9   Bad Subscript10  Redimensioned A 0  day             1  month             2  yearTIME(nn)  Returns components of time as numbers:             0  hour             1  minute             2  second             3  sixtienth of secondMOD(x,y)     Returns x MOD y.  That is, INT(x/y) [or x\y in             MicroSoft BASIC].REM(x,y)     Returns remainder after integer division.  That is,             x-(INT(x/y)*y).HEX$(nnnn)   Returns a string which is the integer nnnn as a             hexadecimal number.  If nnnn<256, the string it Found28  I/O Error29  No More Room30  File Locked31  Syntax Error32  No Buffers Available33  File Type Mismatch34  (unused)35  (unused)36  Control BufferOeflow(3)  I fixed the line buffer so it's 254 characters long.Why it was set to 128 I don't know.  A 256-byte bufferwas allocated, but in the INPUT LINE routine it checksfor overflow at 128.  I just POKEd it to 254 and every-thing is fine.(4)  INSERT and DELETE keys replace ^N and ^O!(5)  ^P works in TEXT40 and TEXT31 (Ben Hinkle's did couldn't remember the ASCII code for "*".******** OTHER CHANGES IN SmartBASIC 1.x ******************************(1)  I have patched the variable command interpreter (i.e. the partof SmartBASIC which interprets math and string functions) sothat functions which heretofore required "dummy" arguments nolonger need them.  (The "dummy" forms are still valid, however.)These include:     ERRNUM, POS, VPOS, FRE, RNDSo now you can say x=POS instead of x=POS(z), where z is the"dummy".  RND works like RND routine so that controlcharacters echo on the screen when you type them!  Youcan see the little hearts when you type ^D now.(8)  The cursor is now hidden unless the program is waitingfor typed input (like in SatBASIC 2.0).(9)  POS and VPOS now return values beginning with 1 instead of 0.This is important.  If you tried to keep the cursor on the sameline with X=VPOS: .... VTAB X: you used to end up on the previousline!  POS now 1-31 or 1-40; VPOS now 1-24.(10)  I believe in parameter checking!   spent much timewith EOS graphics.(4)  Incorporation of the debugged file I/O routines from SmartBASICv2.0.  These require the use of EOS-7.  This version of EOS, however,has been streamlined to make room for a third file buffer; among thelosses is support for files larger than 255 blocks.  (The hiword offilesize is simply ignored.)  This will make problems for people withEOS systems on 20MB hard drives, for instance.(5)  Access to expanded memory.  I haven't got any on my ADAM system,and what I'raps errors correctly, with unlimitedreoccurrence, WITHOUT blowing up the stack.  Errors which occurwhile executing the error-handling code (before RESUME or RESUME #)cause execution to at with the appropriate error message.  (Thisprevents infinite loops, then stack blowup and system lockup -- orworse, like trashed tapes/disks.)******** WISH LIST FOR SmartBASIC 1.X *********************************(1)  support for v2.0 device drivers (ADAM parallel and serial I/O).(2)  RENUM oldstart,newstart,stetime the command was issued, to change the defaultnumber of buffers or file control blocks.***********************************************************************I hope this is exciting/inspiring to somebody out there!Regards, Richard F. Drushel  CWRU Dept. of BiologySend E-Mail to:      rfd@po.cwru.edu          [Internet]                     rfd%po.cwru.edu.cunyvm   [Bitnet]                     rfd                      [Cleveland FreeNet]                     36                       [Cleveland A                                  1000 bytes, or more.  It may not                                   be worth the space. (3)  Ben Hinkle's "Hacker's Guide to ADAM Vol. II" commands for srtesand sounds.  SOUND is easy, I just haven't gotten to it yet.  Thesprite commands, however, have some problems associated with them.For one thing, once you SPDRAW a sprite, you seem to be stuck with itin HGR/HGR2 -- I don't know how to program XSPDRAW (the logicalsprite equivalent of XDRAW).  Admittedly, I haven'tGraphics commands are nowchecked for range and mode.  For instance, if you try DRAW 1 AT 4,5when you're in TEXT31, TEXT40, or GR, you get an "Illegal Mode"error.  The same for FLASH and INVERSE in GR, HGR, HGR2.  Also,if you try to HPLOT, DRAW or XDRAW outside the HGR window, you get"Illegal Quantity" error.  PLOT is similarly restricted to GR, etc.All the new commands which require numeric arguments are checkedfor range.  None of this "accept it but ignore it silently" stuff!(11)  ONERR GOTO now tve seen of the EXTMEM implementation of SmartBASIC 2.0does not inspire me to attempt it.(6)  Implementtation of AppleSoft's MAXFILES command.  The easiest wayto do this, I think, would be to relocate the file bufferst owermemory, above the top of SmartBASIC code but below the variable commandtable.  This way, existing code for LOMEM could be used to relocatethe variable table up or down depending upon how many buffers youselected.  Five or six absolute locations in EOS would have to bepatched each p  Renumber program lines!  Because                                   of the way SmartBASIC tokenizes                                   line numbers in crunch code (it                                   uses the real numbers instead of                                   a pointer to a line number table),                                   this will be very, very difficult                                   to implement.  The amount of RAM                                   required will probably be 500- DAM BBS]EOS1>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿnity as  a  whole. Jason promises updates  in the future. Perhaps a self  booting     media is one of those  updates.     Per Jason's instructions,I  booted basic then I entered "run TOOLKIT". After it was  loaded,I was presented with  the following     menu-- 0. exit toolkit 1. display this stack 2. create cards 3. use this stack 4.   ........... 5. show titles 6. edit a card 7. load a stack 8. save this stack ?   Again,per instructions,I  chose 7. load a stack This  then prompts for the stack. I      HYPERCARD for Adam!     At Adamcon02,I had the honor  and pleasure of meeting   Jason  Brown,author of Hypercard for  Adam. At that time,he hadn't  quite        finished the product.  However,he promised that it  would be ready in the next week or so. As a veteren of  such "promises",I took this  with a large grain  of salt.  Imagine my surprise when Jason  wrote me 2 weeks after the           convention to tell me it was  finished! I decided to give it  a try and ordered it.     Hypercard arriverely start  typing in your "scenario". HC does the entering of code FOR  you! The benifits are  immediate especially in     writing a text adventure game.  You merely enter the text and  then at the  end of a card,give  the user the choice of what to  do next. Once that input is  given,HC jumps to that next  card. Think of these "cards"  as a deck of        playing cards.  They can either be set up to  take the user down a  predetirmed path  or radomly  depending on the users input.     What the abovr some very "jazzy" hand  done          graphics.     Jason encourages us to boot  it and try it out. So      let's  get at it. Hypercard is NOT on  a self booting media. One must  boot    Smartbasic first. I'm not  sure just why this is. While  Jason understands HELLO   programs,perhaps he doesn't  know enough to make the whole  thing self boot.     This is only  a slight drawback however as I  believe that Hypercard at this  point is intended more for  programmers than as product  for the Adam commuÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿtyped "demo". As the name  implies,this will give you  very  good demo program so you  can see what Jason has in mind  for Hypercard. It's  fairly  simple and straight forward.     But what,you may ask,IS  Hypercard? From messing around with this program,I can see  that HC is a fine programming  tool. What it does is  eliminate the need for  programming seemly endless  code. Instead of       having to  know everything there is to  know about Smartbasic before  you    can even begin to  program,you med on data  pack. This is due to the     fact  that Jason's Adam only has  data drive,no disk drive. I  hope that Jason  makes enough  of of this product to buy a  disk drive. It's been quite a  while  since I've done any work  with data pack!     Accompanying the data pack  was a hard copy of          documentation bound in clear  plastic folder. In it,Jason  gives pointer's on how   to use  Hypercard and what he  envisions for it in the  future.This is very    well  written and includes on the  covee means is that  ANYone can now program on the  Adam. While I used only a text  adventure as an example,the  possibilities are almost  endless. And Jason promises to  add graphic abilities to     Hypercard in the very near  future. Having met and talked  with Jason,I can assure you  that he is a man of his word.  He is also very enthusiastic  in his       support for Adam.     While this program has a few  minor bugs(mostly the     demos  are unfisnished and merely  dump you back to basic),I  would cealled the Max232.  It's 
function is to convert the normal computer TTL level signals to 
standard RS232 levels.  This changes the computers +5 & 0 volts 
into +10 (normally +12v) and -10 (normally   -12).  These levels 
are allowable to RS232 standards.

WHY DO I WANT A SERIAL CARD?
Hear the reason for wanting a serial card.  This card is used to 
interface the computer to a host of standard RS232 type devices.  
Typical example would be an external modem however there is a 
multitude of devices From the 463 ADAM newsletter - 12/90¯TIPS ON MAKING¯¯BACKUPS¯ (Yes, AGAIN!)by Jerry Vrancks, 463 ADAMI thought I was doing a good job at making backup copies of my software until my one and only disk drive developed a bad case of amnesia. I then discovered most of my more used software was on disk and so were the backups. I copied most of my data packs to disk but not vice versa. I couldn't even use my DM printer, all the printer patches were on disk. Needless to say from this point on every piece of of the modem is 300 baud 
as it is configured however after connecting it as indicated, you 
bypass the 300 baud limitation and can progress upwards. 

START AT THE BEGINNING.
A few stats are in order, first off, the serial card will operate 
at 300 and 1200 baud by just adding the MAX232 chip and cables.  
No other circuit modification is required.  This is due to an 
internal multiply register.  To achieve the 9600 baud upper limit 
would require some jumpers and crystal interchanging.   It is f.pl 59
.mt 0
.mb 0
.po 5
I always wondered what a serial card was all about, sure the 
signal lines were understood awhile back but the mystery of 
getting everything to work was still unanswered.  A bit of 
experimentation provided those answers and now I am a proud owner 
of a serial card which cost me next to nothing to build.
I should clarify that I had to canibalize an original 300 baud 
modem (Which I didn't use anymore anyway) then there was a chip 
which I had to purchase.  This chip is crtainly       recomend it to  my fellow Adam users.  Finally,we mere users can be  in the     drivers seat!     Hypercard may be ordered from  Jason Brown Software 312 ADELAIDE ST. WEST #805 B TORONTO,ONTARIO,CANADA M5V 1R2 Cost is 25 dollars     American  plus 3 dollars S&H. Send a  Money Order for prompt  delivery.       You'll find the  product well worth the low  cost!    Bart Lynche set up to  take the user down a  predetirmed path  or radomly  depending on the users input.     What the abovavailable.  My personal preference for 
designing the serial card was to interface to another computer 
with serial capabilities however an RS232 terminal can be 
interfaced to thereby obtaining an 80 column display on the Adam.

SO WHAT IS THE PURPOSE OF THIS ARTICLE?
This article is being released so that others have access to the 
design details to build their own serial card. A card which is 
capable of speeds from 9600 baud up to 56k baud.  Sure enough 
these speeds are to spec, the limitation softwaer WILL be backed up on disk and datapack. This wouldn't have been such a major catastrophe if I had two disk drives, or had been a little more  foresighted. Thought I would just pass this tip along so someone else doesn't make my mistake.åååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååor 
this reason that the circuit diagram enclosed with this article is 
so detailed.  It shows the clocking circuitry responsible for the 
speed output. 9600 baud  is the upper limit if your going to 
communicate asynchronously.  You will encounter this type most 
often.  When you operate in synchronous mode, the upper 56k baud 
rate is achievable.

EXPERT APPROACH TO CONSTRUCTION.
Withholding the technical details, observe the circuit diagram 
labeled "Adamlink Modem converted to Serial card".  Tider that 
another internal multiply selection is X16.  So divide 19040.13/16 
yields 1190 baud.  As you see, we are starting to exceed the 
allowable limits.
The last internal multiply is X1.  Now consider replacing the 
crystal with one that divides down to 9600 baud in the X1 
multiply.  This would yield 9600 baud yet no other useable baud 
rates.  This is a limitation.  You can fiddle around some and 
obtain 9600/2400.  Your main concern is with the chip 
requirements. The specs state that incoype connector, 2 1/2 feet of 4 conductor 
cable 22 AWG, 1 breadboard to solder everything onto plus some 
connecting wire.Š
CONSTRUCTION CONSIDERATIONS
Be sure to ground yourself while handling the modem board.  A sure 
way to destroy the modem is by static electricity.  The modem 
circuit board can be removed from it's case by peeling off the 
Coleco sticker on case top.  Then pry apart.  The largest chip on 
the board is the INS8251 chip which should be labeled U6.  The 
MAX232 capacitors are flave to (Note diagram shows a divide / 47)
be placed after the inverter.  The end result is to achieve 9600 
baud in the x1 mode.  By bypassing the two flip/flops and 
configuring to X16 mode gives you 2400 baud.  If your really gung 
ho then try wiring the programmable divider to a port address with 
an 8 bit latch thereby giving your full 9600/4800/2400/1200/300 
baud rates.  My suggestion here is to gain the spec sheet on the 
MC14569 Divide by N chip for further details.
SOFTWARE IMPLEMENTATION
AX232 DTR output to pin 6 on the DB25 connector (DSR). faster 
baud rates will involve changing the crystal.  Observe the 
reasoning here.  The incoming frequency is 3.579545 MHZ.  The 
divider from Xtal to TXC in order is /2, /47, /2 for a total ratio 
divide of 188.  Therefore the incoming baud rate (clock frequency) 
is 3.579545/188 = 19040.13 baud.  The chip however is software 
configured to a multiply of 64 therefore 19040.13/64 = 297.5 baud.  
Yes your modem is actually running slow.  Now conshe lower half 
of the diagram is where the modification parts are located.  
Essentially you must cut 2 traces on your modem card which go to 
pins 3 and 5 of the U7 chip.  This should be the 74HC943 300 baud 
modem chip.  You then connect the MAX232 chip to the INS8251 (U6) 
chip.  After that there is a DB25 connector.  If you want to save the
modem then install switches where you cut the traces.


PARTS REQUIRED.
1 MAX232 chip, 1 16 pin socket, 4 22uf 16v Electrolytic 
capacitors, 1 DB25 male tming clock signal on pin 20 
must be greater or equal to 4.5 times the transmit/ receive clock.  
If using synchronous mode, observe 30 times factor.  Therefore if 
you operate at 9600 baud in the X1 mode, the incoming clock signal 
must be 9600*4.5 = 43200Hz.  This is not achievable though since 
the minimum clock signal allowed is 740740 Hz while the maximum 
incoming clock signal is 2.380952 Mhz. My personal preference is 
to replace the crystal with a 1.8432 Mhz value.
The first flip flop will hexible and can be lower than 22uf is so 
desired.  The trade off is in output impedance thereby limiting 
cable length and increasing chance of device errors.

DESIGN DETAILS
The configuration shown will provide a 300/1200 baud serial card 
in the DTE format.  This will interface to modems and other DCE 
type devices.  It will not interface to a terminal since a 
terminal is a DTE type device also.  Changing between DTE to DCE 
is rather simple, just switch the TXD and RXD lines and connect 
the MA hardware design is only as good as the software behind it.  
Fortunately the USART chip is understood by a variety of 
programmers already.  The problem arises since these programmers 
restricted their software to operate at 300 baud only (X64 mode).  
This is identified as a multiplier of 3 programmed in the 
initialization overlay.  X16 is number 2 and X1 is number 1. I 
personally will have software available for the configuration of 
yet undetermined nature and you may wish to consult me for deroject.
For a $5.00 fee I will send you a configured 80 column patch along with
source code plus a configured Mex communications software package.
Please note that the configuration is for use with original CP/M or
atleast that which contains the original video drivers.  I have no
idea if TDOS is compatible.

This project should only cost you around $15.00 to build but if you wish
then send your working modem (some non working ones may still work) to
me along with a cheque in the amount of $35 payautilized via a terminal 
program to allow high speed transfers between two computers.  
80 column terminal software will be a secondary priority however 
the software implementation is rather rudimentary.

IN CLOSING.
I make no warrants to the information discussed in this article.  
I have built and tested my own version as described with exception 
to the programmable baud rate mod.  To my knowledge this 
information is accurate to the circuit construction that I 
prepared.  Special thanks to Joroject.
For a $5.00 fee I will send you a configured 80 column patch along with
source code plus a configured Mex communications software package.
Please note that the configuration is for use with original CP/M or
atleast that which contains the original video drivers.  I have no
idea if TDOS is compatible.

This project should only cost you around $15.00 to build but if you wish
then send your working modem (some non working ones may still work) to
me along with a cheque in the amount of $35 payanotice the diagram shows
the one chip having a divide of 47.  It should show 48.  I corrected
the original above article especially in the calculation of baud rate.
Second, I have tried the programmable baud rate mod and still encountered
an unsucessful operation above 1200 baud.  I've also written 80 column
software which allows control to pass to a serial terminal with or
without a keyboard.  These files will be made available as a means of
obtaining remission for the work involved to create this ptails 
when my final configuration is completed.  In the meantime, I am Šoperating the base circuit at 300/1200 baud and have Adamlink II 
operating.  This software operates at 300 baud only since it uses 
the 60Hz interrupt vector to read data from the USART.  1200 baud 
is operational but you miss some characters.  I will most likely 
be pursuing the programmable baud rate via a port address and an 8 
bit latch connected to the MC14569 chip with an 1.8432 Mhz 
crystal.  This configuration will be ble to:
Trisyd Video Games
26 Florence Cres
Toronto, Ontario
Canada  M6N 4E4

and I will construct it and send you the current configured software.
Good luck.  The associated diagram (serial.prn) must be unarced directly
to a dot matrix printer.  The syntax would be Unarc triser serial.prn p


ithout a keyboard.  These files will be made available as a means of
obtaining remission for the work involved to create this pe Magner for his initial assistance 
with understanding the modem circuitry.

FOR FURTHER ASSISTANCE.
You can call me by voice between the hours of 8:30pm - 10:30pm at 
(416) 769-6446.  I will provide circuit mods to those who desire 
it. Syd Carter 

Revision:  May 2, 90....  After hearing that this file and associated
schematic diagram was not made readily available, I have posted this
to Compuserve for distribution.  Since this article was written, a
few updates have occured.  First, you will Technical WorkSHOP on the ADAMLink Internal modem ADAMLink modem controlBy Alan Neeley    @ Have you ever wished you knew how the  ADAMLink phone modem worked? This arti- cle has been written for those of you  who have at least some knowledge of  BASIC programming and a need to communi- cate with the internal modem (either out  of general curiosity, or out of the need  to create or modify a telecommunications  program).    Before I continue on discussing the  ADAMLink modem, I want to make sure th select  the correct value to send to the control  port to tell the modem what you want it  to do (or in one case, to find out what  it is doing).    The first table lists the instruction  values for all the commands that the  ADAMLink modem is able to perform. Some  of the values are added before they are  actually sent to the control port.  Others are used directly.    The second table is a list of the char- acter mode values. These values set the  modem's parameters so it can correctly  send and r knowledge a lit- tle on the subject of machine language  programming (and making use of it  through SmartBASIC). @ ADAMLink's_PORTS @ The ADAMLink internal modem has two  ports that are used. One port receives  and sends the data that is being trans- mitted through the phone lines. This  port is known as the DATA port. The  second port is called the CONTROL port.  The control port is used to set the  modem in various modes and it controls  the way that the data is sent and  received through the datach but has been included  for those with a little more knowledge  in machine language programming.     COMMANDING THE MODEM    Let's discuss some of the more useful  values (or commands) that can be sent  out to the control port. This would be a  good point to introduce the machine  language routine that is used to send  your command to the control port.    LD A,(CONTROL BUF) OUT (CONTROL PORT),A RET    Keep in mind that CONTROL PORT = 95 and  that the CONTROL BUF = the particular  ADDRESS in memorotice the words COMMAND and STATUS that  I used in the paragraph above. What do  they mean? Well let's start with  COMMAND. When you send a value to the  control port, you are telling (or com- manding) the modem to do something.  STATUS means that you receive a byte  from the control port to determine cer- tain conditions of the modem's data port  among other things. The byte is broken  down into bits to determine the  conditions.    You will notice that I have included  some tables that will help youat  all readers understand some common com- puter terminology that I will be using  in this article (of course, if you al- ready understand them, then you can skip  over this part). If you are not familiar  with the terms: PORT, ADDRESS, &  Low/High-byte notation, then you should  read Beginning the Technical Workshops  article I have included in this issue.  If none of this makes sense (even after  reading the beginning article), then I  suggest that you do some further resear- ching to increase youreceive information through the  data port. To determine the value for  the desired setting from the table: Make  a selection from column A and column B  (add the values together), then add to  any other values that may be needed (the  value of 3 is ALWAYS added to the total  for 300 BAUD). For reasons I'm not sure  of yet, The NULL value is added in when  using 7-E-1.    The third table lists the STATUS bits  and what they represent. For reasons  that are discussed later, this table  won't be used mu port.    @ The_CONTROL_PORT @ The CONTROL port is probably the best  place to start the discussion (although  it may be the most difficult of the two  ports to explain). This port has been  assigned a value of 95 (remember that's  a decimal value) so whenever you wish to  send a COMMAND to or receive the STATUS  from the control port, you use this  value to communicate with the control  port (this value will actually be used  in the machine language routines which  will be discussed later on).    Ny where you are POKING  your value (or COMMAND) that you wish to  be sent out to the control port (in the  example data I use below, the address is  28013). Translating this ML routine into  decimal values that can be used in data  statements for SmartBASIC, we end up  with:    58,109,109,211,95,201    Now for those of you who are used to  working with ML routines in this form, I  will offer some little hints. Look at  the 6 pieces of data I have provided  above. Only 3 values are of general  interes__________________________________ TABLE #2 @ CHARACTER MODE VALUES  @ COLUMN A COLUMN B     STOP BITS CHARACTER LENGTH 1 bit = 64 5 bit = 0 1 1/2 bits = 128 6 bit = 4 2 bits = 192 7 bit = 8 8 bit = 12    OTHER MODES: ENABLE PARITY = 16 (NO PARITY if not set) EVEN PARITY = 32 (if not set, then ODD)    REQUIRED VALUE: 64X CLOCK RATE = 3 (required for 300 BAUD)    OPTIONAL VALUE: NULL = 128 (full purpose not known) _______________________________________     ANSWERING THE PHONE    To command the ADAt  some useful commands!    _______________________________________ TABLE #1 @ COMMAND INSTRUCTION VALUES @ 128 = HUNT MODE 64 = INTERNAL RESET 32 = ENABLE TRANSMITTER (set RTS to 0) 16 = RESET ERROR CONDITIONS 8 = SEND BREAK (TXD goes LOW) 4 = RECEIVE ENABLE 2 = SEIZE LINE (set DTR to 0) 1 = TRANSMIT ENABLE _______________________________________     INITIALIZING THE ADAMLink MODEM    Before you can begin using the internal  modem, you must set it up properly by  initializing it. This is done by sealing (this is the same  as the old rotary dial phones and the  'cheapies' that are sold at almost any  store nowadays). Now to dial a number,  you must first set the modem to origi- nate mode. This is done by sending the  value 10 to the control port (this value  also takes the phone of the hook).    Now with pulse dialing, a quick series  of 'CLICKS' are sent to dial each digit  in the phone number (the best way I can  explain a click is that it's like hang- ing up the phone and picking it up againarity/1 stop bits (which, from know on,  I'll refer to as 7-E-1 and 8-N-1). The  value that is used to set the character  format to 7-E-1 is 251 (with the NULL  bit set) and the value for 8-N-1 is 79  (these values were calculated from table  2). The parameters must be set each time  during the initialization process (it is  the third value sent). After that, the  parameter setting can be changed again  at any time by sending the correct value  for the desired setting to the control  port.     _____t. The second and third numbers  are the Lo and Hi-byte values of the  address where the value that you wish to  be sent to the control port is located.  In this case, both numbers are 109.  (which when figured into a true decimal  value, they equal 28013). The 5th value  indicates what port the value found at  address 28013 will be sent to (of  course, the number located here is 95  which you should now by know is the  value used for the CONTROL port). Enough  said about the routine, let's talk abouMLink modem to answer  the phone and connect the carrier, you  must send two values to the control  port. The first value that is sent is  7. This commands the modem to go into  answer mode (this is just like taking  the phone off the hook). The second  value that is sent is 39. This tells the  modem to send out the answer mode signal  and connect the carrier if it detects  the originate mode signal.     COMMANDING THE MODEM TO DIAL A NUMBER    The ADAMLink modem makes use of what is  called PULSE dinding  three values (or commands) to the  CONTROL port. The 3 commands are HUNT  MODE (128), RESET (64), and the particu- lar value for the Parameter setting (or  character format) that is desired.     SETTING THE PARAMETERS    If you've used a modem to any extent,  you are aware that the parameters must  be set properly to communicate with  various bulletin boards and other compu- ters through your modem. Two of the more  popular settings are 7 data bits/even  parity/1 stop bit and 8 data bits/no  p  REAL QUICK). If the number (or digit)  you wish the modem to dial is a 1, you  send 1 click. If it is 2, you send 2  clicks and so on up to 9. If you wish  the modem to dial a 0, send 10 clicks.  Now to command the modem to do a  'click', you send out to the control  port the value 0 quickly followed by the  value 10. Now for the dialing procedure  to work correctly, you should put some  pauses in between the actual picking up  of the phone (which is done when the  first value of 10 is sent to the  programming, take a  look at the third table I have included.  If you can not understand what this  table is saying, don't worry this part  is all taken care of in the machine  language routines I have provided in  this article. If you FULLY understand  what the machine language routines do,  then you will also see the usefulness of  table 3.    _______________________________________ TABLE #3 @ THE STATUS BITS @ BIT 0 = INDICATES TRANSMITTER EMPTY BIT 1 = INDICATES VALID CHARACTER READY BIT 2 = IN   There is also a special value that can  be sent to the control port that will  cause the modem to pick up the phone and  go directly into originate mode. The  value is 39 (without the value 7 being  sent before it -- which would set the  modem to answer mode).     HANGING UP or DISCONNECTING CARRIER    There are two values that can be useful  in disconnecting your modem from another  modem. The most commonly used value is  37. This value commands the modem to  disconnect the carrier signal (whetheher simple  machine language routine that can be  used to detect if the carrier is still  connected. Here is the assembly listing  of it:    IN A,CONTROL PORT BIT 7,A RET Z LD A,255 LD (CARRIER BUF),A RET    I will briefly explain how this routine  works. First the routine takes the stat- us byte from the control port and loads  it into register A. It then checks BIT 7  of the value to see if it is set (this  bit is the carrier detect bit). If the  bit isn't set, then the routine is exit- ed. If it i that may need to be  done before accepting the next caller. CHECKING THE STATUS    Now when you receive the STATUS from the  control port, you are able to determine  various things such as: if the modem is  connected to another modem, if their is  data ready to be sent or received, and  so forth. The MOST important one is  being able to determine if your modem is  connected to another (this is referred  to as CARRIER DETECT). For those of you  who have a little bit of experience in  machine languagecontrol  port). You should also put a pause in- between each 0 and 10 that is sent for  the 'click'. For a good example of what  I'm talking about, take a look at the  listing of the terminal program I have  included.    After the dialing has been completed,  you wait for the modem you are calling  to answer the phone. When a modem  answers at the other end and sends out  an answer mode signal, the ADAMLink  phone modem will automatically send out  the originate mode signal and connect  the carrier. DICATES BUFFER EMPTY BIT 3 = SET WHEN PARITY ERROR DETECTED BIT 4 = SET ON OVERRUN ERROR BIT 5 = SET ON FRAMING ERROR BIT 6 = SET WHEN BREAK DETECTED BIT 7 = INDICATES CARRIER DETECT _______________________________________     CARRIER DETECTION    Being able to detect if your modem is  still connected with another modem is  important. If you try to send data  through the data port without a modem  connected, it can cause the computer to  'freeze up' (requiring you to reset  everything). There is anotr  you are in Answer or Originate mode) and  then disconnect the modem from the phone  line (I call this 'putting the phone on  the hook'). The other value is 0. This  value disconnects the carrier signal but  leaves the phone line 'off the hook'.  This value can be useful in conjunction  with a BBS program. It allows the pro- grammer to disconnect the current cal- ler, leaving the phone line busy (or  'off the hook') until the value 37 is  sent. This way the BBS program can per- form any maintenances set, then the value 255 is  loaded into CARRIER BUF and the routine  is exited. CARRIER BUF is the address in  memory where you wish the value 255 to  be put if the modems are still  connected.    Here is how you make use of the routine  in BASIC. Using address 28047 as CARRIER  BUF, the above routine translated into  decimal values would look like this:    219,95,203,127,200,62,255,50,143,109,201    The 9th and 10th values (143,109) are  the Lo/Hi-byte values for CARRIER BUF  (which if you figuruman typing on a  keyboard). However, when data is being  received through the port at a faster  rate of speed (such as in the case of a  BBS when the computer sends the data),  there will be a problem with occasional  data being lost. Here is an assembly  listing of the routine:    IN A,CONTROL PORT OR A BIT 1,A RET Z IN A,DATA PORT LD (IN BUF),A RET    Notice how this routine also makes use  of the control port. It is checking the  STATUS byte to see if a valid character  is ready to be sent through own if you want). @ THE_DATA_PORT @ Now let's get along to the easy part of  the discussion -- The DATA port. Simply  put, the data port sends and receives  the information that is being shared by  the two computers once they are connec- ted through the phone lines. This infor- mation is usually in the form of ASCII  character codes. For Example: if the  decimal value 65 is sent through the  port, it usually refers to the capital  letter 'A'. If the value 13 is sent, it  refers to a carriage return number (94) is referring to the data  port.    When using this routine in SmartBASIC,  it is a good idea to POKE the value 0  into IN BUF just before calling the  routine. This way you can PEEK into the  address where IN BUF is located (in the  example it is 28061) and if there is any  value there other than 0, than you know  a valid character has been received.     SENDING INFORMATION    The ML routine used to send information  through the DATA port is similar to the  receive routine. It first che the two ML routines that are  used to send and receive information  to/from the data port.     RECEIVING INFORMATION    Like the other ML routines that have  been presented so far, the routine that  receives information from the data port  requires a 1 byte buffer where the in- coming data can be put. Within the con- finements of the SmartBASIC interpreter,  the 1 byte buffer is efficient enough  when the data being received through the  port is coming in at a slow rate (such  as in the case of a he it up, equals  28047). Now before you CALL this routine  from BASIC, POKE a 0 into address 28047  (CARRIER BUF). If (after you have CALLED  the routine) the value at address 28047  is still a 0, then there is no carrier.  If the value at address 28047 is 255,  then the carrier has been detected  (meaning that your modem is connected to  another modem). Keep in mind that in the  ML routine I have provided above, the  address 28047 and the value 255 are  simply ones I have chosen (you can  choose your the data  port (if BIT 1 is set, then it continues  on. if not, then it exits the routine).  IN BUF is the 1 byte buffer where the  incoming character will be sent. In the  SmartBASIC example I use below, the  address of the buffer will be 28061.    219,95,183,203,79,200,219,94,50,157,109,201    The 10th and 11th numbers (157,109) are  the lo/hi-byte values for the address  where the incoming data will be sent.  Also notice that the second number (95)  is referring to the control port and the  8th and so on.  However, there are other cases where the  information being sent might not be in  ASCII form. This is true in the case of  a CP/M program being sent using XMODEM.  Generally though, the information is  sent or received through the port 1 byte  at a time (which means that it could be  any decimal value from 0 to 255).    The internal modem's DATA port has been  assigned the value 94. This value will  always be used in the ML routines when  referring to this port. Now it is time  to discusscks the  STATUS byte (only this time its BIT 2)  to see if the transmit buffer is empty.  if it isn't, it keeps jumping back to  the first of the routine until this  buffer is empty. Once the transmit buf- fer is empty, the routine looks into OUT  BUF for the value that is being sent and  then sends it through the data port.  This routine is very efficient in that  it never has any character loss like the  receive ML routine can. Here is the  assembly listing of the routine:    IN A,CONTROL PORT BIT icate with each of these  particular devices. Every port is  assigned a specific value so that the  computer (and its programmer) can  communicate only through the desired  port. @ BUFFER @ The word 'BUFFER' refers to a spot in  memory where information is temporarily  stored before it is used elsewhere. I  like to think of a buffer as an ENTRANCE  or an EXIT to the port. @ ADDRESS @ You will also see the word 'ADDRESS'  used frequently. This word can be  defined in computer terms in much the  same wa    BEGINNING THE TECHNICAL WORKSHOPS BY ALAN NEELEY (ADAM-LINK OF UTAH) @ I included this introductory article to  the Technical workshops for those of you  who may still need to learn a little  more before attempting to understand  what is being said in this series of  workshops. It will also be useful for  those who may need to 'brush-up' on some  of the basic concepts that will be used.  If you don't understand what is being  said here, you may want to do some  additional researching before continy the terms 'HIGH-BYTE' and 'LOW- BYTE' addressing. To be able to access  all locations of the computers memory  when using machine code routines, the  programmer must split the address  (memory location) into two values. The  LO-BYTE value counts from 0 to 255 and  when it reaches 255 it goes back to 0  and adds 1 to the HI-BYTE value. Thus  the HI-BYTE value tells you how many  times the LO-BYTE value has counted from  0 to 255. In memory, the LO-BYTE value  is usually first with the HI-BYTE value  f  technical workshops... WHAT is a port in  computer terms? Is it like a port for a  boat or ship? Or maybe like a time  portal or something? Well sorta... A  port (for computer purposes) is a  passageway through which DATA or  information can be sent to and from the  various hardware devices (computer  peripherals) you may have connected to  your system. Virtually every peripheral  for ADAM (such as a disk drive, memory  expander, or the phone modem) have one  or more ports that are used to  commun2,A JR Z,250 ;250= jump to beginning LD A,(OUT BUF) "?T (DATA PORT),A RET    rtBASIC,  it is a good idea to POKE the value 0  into IN BUF just before calling the  routine. This way you can PEEK into the  address where IN BUF is located (in the  example it is 28061) and if there is any  value there other than 0, than you know  a valid character has been received.     SENDING INFORMATION    The ML routine used to send information  through the DATA port is similar to the  receive routine. It first chey as it is defined in every day  use. It refers to a particular place  where DATA is located within memory (a  buffer will have an address). The  address is the number associated with a  BYTE of memory in the same way a street  address is associated with each house on  a street. The largest decimal value  that can fit into one address (or byte)  is 255. Generally, the ADAM has 65,536  addresses available (numbered from 0- 65535). @ LOW/HIGH-BYTE NOTATION @ The reader should also know what is  meant buing  on.    To keep things simple, these workshops  will be written in the perspective of a  SmartBASIC programmer. This means that  all numbers will be displayed in decimal  form -- the number system that everyone  is familiar with. However, all the  decimal numbers can be easily converted  to hexadecimal or binary and used in a  hexadecimal or binary based medium (such  as CP/M or machine language  programming). @ PORT @ You will find that I use the word 'PORT'  quite a bit throughout the series ofollowing directly after.    So to come up with what the true decimal  value that is being described by the  Lo/Hi-byte values, you multiply the Hi- byte value by 256 and add it to the Lo- byte value. The number you come up with  is the true decimal value.    To break down a true decimal value into  Lo/Hi-byte notation, take the decimal  number and divide it by 256. Take the  WHOLE number that you get (chopping off  anything after the decimal point) and  the WHOLE number will be the Hi-byte  value (Et tape drive speed checker is self booting and the screen will show a line indicating what % off the read/write speed is running at.  The hand controller is used to stop or start the program at any time.  When the software is running it will prompt you to adjust your drive.  This can be done by turning the tape drive speed adjustment screw.  Turn the speed adjustment screw slowly allowing the software time to run to show the new speed.  Keep repeating until the software shows the speed that you desire.  Youuple of simple  machine language routines. These  routines can be placed in a reserved  area of BASIC memory and can be accessed  by the CALL command.    The POKE command is used to put data  into a buffer so that the ML routine can  send it out through the port.    The PEEK command is used to gather  information that the ML routine has  taken in from the port and put into a  buffer.    There is no need to fully understand how  these routines work, but you should be  able to understand the informatias a really great improvement because now the speed can be adjusted without removing and holding the drive upside down.  One quick way to tell if the tape drive is a new JVC is look at the motor mounting screws in the front of the drive.  On a new JVC these screws will be lined up vertically.Coleco revised the speed adjustment tape because of the way they formated the blank tapes changed.  In doing so some additional options are added such as:  light blue screen, measuring the % off of search speed, and pKosowsky's ADAM Repair6067 Jerusalem DriveClay, N. Y. 13041(315) 699-6456TAPE DRIVE SPEED ADJUSTMENT SOFTWAREEver make a back up copy on one Adam and for some reason it works on one of your Adams but not the other?  Well maybe one Adam has a dirty head or just maybe one tape drive speed is a little off?  Thanks to testing software leaking out of Coleco and being placed in the Public Domain this is not a problem!Coleco made for its own use two tape drive speed adjustment software packages.  The firsxample: if the number is 200.567  then chop off the 567 and use 200). To  get the Lo-byte value, take the Hi-byte  value and multiply it by 256 and then  subtract the total from the actual true  decimal value. Whatever is left over is  the Lo-byte value. It can be confusing  trying to understand what I have just  said; but after trying it a couple of  times, it becomes easy. @ MACHINE LANGUAGE ROUTINES @ In SmartBASIC, to send data to or  receive data from a port, the programmer  must make use of a co will note that the speed will vary some with the temperature of the drive.The speed adjustment screw can be found either on the top or bottom of the tape drives.  On the USA and early JVC drives the speed adjustment screw is located on the bottom of the drives.  Turn the drive over and look at the center of the bottom.  Sometimes you have to move the lead wire for the drive head over a little to see the adjustement screw.  On the latest JVC drives the adjustment screw is on the top lefthand side.  This won  presented in this article so you can at  least have some idea of what they are  doing.     take the Hi-byte  value and multiply it by 256 and then  subtract the total from the actual true  decimal value. Whatever is left over is  the Lo-byte value. It can be confusing  trying to understand what I have just  said; but after trying it a couple of  times, it becomes easy. @ MACHINE LANGUAGE ROUTINES @ In SmartBASIC, to send data to or  receive data from a port, the programmer  must make use of a coercent number read out.  The software itself works the same as the first speed adjustment tape V1.0.  However be forewarned that the tape that these are copied to HAS TO HAVE THE RIGHT FORMAT FOR THAT REVISION!!!  There are two different formats that Coleco used with their blank tapes.  The first blank Coleco tapes had a clear see through label, the speed adjustment tape V1.0 can only be used with these.  The second blank Coleco tapes have a light gray label the speed adjustment tape V2.0 can only be used wtar and performing     other  tasks.  OPERATIONS AND TIPS:  The following is shared with the clear understanding that   these  are not the only, or necessarily the best, methods.  This   advice  is offered in the hope that they may help someone else,  especially someone willing to share their improvements to   these   methods.  Conversion from EOS to CP/M or TDOS  While ADAM.COM (CP/M only) can be used to convert from EOS  to  CP/M, FC05.COM is far superior in that it operates on TDOS  and  a          CONVERTING EOS TEXT FILES TO WORDSTAR FORMAT  By:  Bob Blair,  ANN Regional (WordStar) Editor  Recently, I have been assisting the Adam News Network       publication  by converting their articles from EOS into TDOS/CPM,        WordStar  format for use by some of the BBS SYSOPS and Newsletter     Editors  who use WordStar.  In the course of this activity, I have  discovered some editing techniques and shortcuts that may   be of  assistance to others who have similar conversion pursuits. hree in the file type).  I try to come as close as         possible to  the original EOS name, yet let it be understandable too.    The  standard use of the file-type "TXT" for text files is  recommended.  Other nomenclature normally used for file     type  includes SB1 (SmartBasic version1), SB2 (version 2), HRP  (graphics).  Do not try to convert HRP or other non-Basic,  non- text programs to WordStar or edit.  Conversion to CP/M or   TDOS is  sufficient.  Converting to WordStar format.  CALL Uhives.  With the exception of WORDSTAR AND CP/M, all of the above   are public  domain programs.    HARDWARE:  While my conversions are performed using a 20 meg hard      drive  system, with two disk drives and an 80 column               emulator/monitor,  any hardware configuration can theoretically be used.       However,  the ability to view the text in 80 columns is close to      being  essential to this process.  In addition, tape drives are    far too  slow for convenience in booting WordSith these.  This is very important because if the wrong tape format is used then the softare will give you false readings.  The software will seem to be working but will set your tape speed about 6% off.  I know this drove me crazy for a long time since I had the V2.0 on a old formated tape.If you get this software and it is not on a Coleco brand tape or not the right Coleco tape DO NOT take a chance.  This can be corrected by just copying it to the correct type of Coleco blank tape. search speed, and pllows you to see all of the files on the screen at one     time, and  tag them individually, or collectively, for quick renaming  and  conversion to TDOS.  I transfer all of the files at one     time to  another (completely empty) Drive and User area.  I use      drive B1  on my hard disk for the newly converted files.  An empty    floppy  disk would do as well.    FILE NAMING TIPS - renaming the files is sometimes tricky   since  CP/M and TDOS can only use 8 characters in the file name    (plus  t SOFTWARE:  TDOS458 or CP/M2.2 - I prefer TDOS. FC05.COM - to easily tag and convert EOS files to TDOS. ADAM.COM - To convert EOS to CP/M (I urge you to get TDOS) NEWSWEEP.COM - to move files to and from drives and disks. VDE266.COM - to convert carriage return symbols (dashes     "-") to              WordStar-type carriage returns. WORDSTAR version 4.0 (though I suspect versions 2.0 and 3.2 would              perform almost as well. NULU.COM or MAINT096.COM to create library files for        arcP EACH FILE INTO VDE266 THEN SAVE (Control +  K then  S)  them immediately, without changing anything.  This sets up  all of  the carriage returns into wordstar format automatically.    CALL UP THE FILE IN WORDSTAR, then:   *  Type Control + O (letter O) and J, to disable right      justify.  *   "   Control + Y to erase the first line of garbage.         (Often times there are two or three lines at the          top of the article that are repeats.  Look         carefully          for the correcto        embolden             text, underscore, change fonts, etc.  These     will show             up in the WordStar text at the beginning and    end of              paragraphs etc.  Use the Control Q then A (find and             replace) command to search for each type and    replace              with nothing.  Frequently encountered symbols   include             Numbers (27), \A, \W,\Q,\B,\w,\K,\\,R~n05, etc.             I do these one at a time, saving the \\'s until last             because ifinning.  SPECIAL NOTE:  If the file is a SmartBasic program, I stop  editing at this point and use the Control + X to save and exit WordStar.  Often further reformatting/changes will cause unwanted alteration to the program content and proper spacing.  *    Type Control + U to reformat entire document to 65       columns.  (Note, use Control + O then R to set other       widths).  Control + B will reformat a single           paragraph.  *   Use wildcard key to eliminate unwanted carriage returnsuse the Control + Q then U command to reformat      again     to make adjustments for the spaces and characters       previously      eliminated (Newsletter editors prefer documents without     right side justification, so don't forget the Control O     plus J command to disable the justification before      reformatting).     *   OTHER FREQUENTLY USED COMMANDS include:      Control + K then S to save a document     Control + K then Q to quit without saving     Control + K then X to save a docume to be             replaced with one space.  Then ask it to find a              period followed by one blank space, and replace it              with a  period followed by two blank spaces to  reset              the proper spaces between sentences.  WATCH OUT FOR             UNWANTED CHANGES TO ANY SPECIAL PROGRAMMING     FORMULA              OR OTHER DISPLAYS IN THE TEXT BODY.      Printer Calls:  WordProcessing programs use a wide      variety of             different symbols to tell the printer t beginning of the article in the    third,          fourth or more line.  Use Control + G to erase           individual characters.  You will find some repeats          at the very end of the article also, which must be          erased.)    *   "   Control + C to get to end of article, and Control +         R to get back to the beginning (to see what length         and end of article looks like).  Control + Q then C         goes straight to end, Control + Q then R returns          straight to beg you eliminate them first it's harder to             find those that have a slash before a letter,   like:             \w, \A etc.)  User Control + Y to eliminate     large             groups of such symbols.  Note to give you       control             over which items are eliminated during (G)lobal             search, do not enter N at the "options" prompt.             You will be asked to replace each item (Y or    N).  *   AFTER ALL EDITING IS COMPLETED, return to top of        document     and      (use down arrow key to move past carriage returns you      want to keep).  *   Type Control + Q then A to automatically find and       replace     a wide variety of unwanted:          Spaces: Use spacebar to tell it to find three blank     spaces             and replace with one blank space, then use the             G - for global, and N - for no pause - and      press              return and it will eliminate blank spaces.      Repeat             that twice and then drop to two blank spacesnt and exit WordStar  Conclusion:  I use Newsweep to transfer completed files to a separate  drive/disk and NULU to create libraries of ANN disks.   MAINT096.COM is a new program in Beta testing - it will     replace  Newsweep and Nulu and other programs like them as it is     more  versatile and faster.                                                              You will be asked to replace each item (Y or    N).  *   AFTER ALL EDITING IS COMPLETED, return to top of        document     and 020 br%=VAL(br$):IF br$=ex$ GOTO 12002030IF br%<1 OR br%>15 GOTO 20103000GOSUB 300003010VTAB 18:INPUT " Letter color value: "; ft$3020 ft%=VAL(ft$):IF ft$=es$ GOTO 12003030IF ft%<1 OR ft%>15 GOTO 30104000GOSUB 300004010VTAB 18:INPUT " Background color value: "; bk$4020 bk%=VAL(bk$):IF bk$=es$ GOTO 12004030IF bk%<1 OR bk%>15 GOTO 40104040IF bk%=ft% GOTO 40105000HOME:HTAB 9:? "drive: "; 5010IF dv%=8 THEN ? dv$(1):GOTO 51005020? dv$(2)5100? " border color: "; co$(br%)5200? " letter color:"; co$(10REM ***SmartFILER patches20REM fixes extra line feed bug and changes screen colors30REM written by DIGITAL EXPRESS40REM presented by Nibbles & Bits50REM contributed September, 198760REM USE ONLY ON A BACKUP COPY OF SmartFILER!!!70REM written for use with "revision 27D"80REM may not work with other revisions100LOMEM :30000110DATA                                                      62,4,1,0,0,17,0,0,33,0,108,205,243,252,50,255,107,201120FOR x=27600 TO 27617:READ mc:POKE x, mc:NEXT130DATA 62,4,17v%:POKE b3, 18:POKE b4, 243:CALL b16120IF PEEK(27647)<>128 THEN VTAB 10:GOTO 55606130POKE 28411, 1:POKE b4, 246:CALL b16140IF PEEK(27647)<>0 THEN VTAB 10:GOTO 55606200REM change the screen colors6210POKE b2, dv%:POKE b3, 15:POKE b4, 243:CALL b16220IF PEEK(27647)<>128 THEN VTAB 10:GOTO 55606230POKE 28392, br%:POKE 28520, br%:POKE 28618, ft%*16+bk%6240POKE b4, 246:CALL b16250IF PEEK(27647)<>0 THEN VTAB 10:GOTO 55606300VTAB 10:? " SmartFILER patched...":END30000HOME:FOR x=1 TO 15: x$=STR$(x)30010IF10? " change the screen color for"1020? " SmartFILER and it corrects"1030? " the extra printed line feed"1040? " bug. Press <escape> at any"1050? " point to abort ..."1100VTAB 15:? " Which drive for SmartFILER?"1110FOR x=1 TO 2:VTAB 16+x:HTAB 2:? x; " = "; dv$(x):NEXT1120GET k$:IF k$=es$ GOTO 12001130 k%=VAL(k$):IF k%<1 OR k%>2 GOTO 11201140 dv%=2^(4-k%):GOTO 20001200TEXT:? " end of program.":?1210? " entr NEW before programming.":END2000GOSUB 30002010VTAB 18:INPUT "Border color value: "; br$2use the Control + Q then U command to reformat      again     to make adjustments for the spaces and characters       previously      eliminated (Newsletter editors prefer documents without     right side justification, so don't forget the Control O     plus J command to disable the justification before      reformatting).     *   OTHER FREQUENTLY USED COMMANDS include:      Control + K then S to save a document     Control + K then Q to quit without saving     Control + K then X to save a documeft%)5300? " bkgrnd color: "; co$(bk%)5400VTAB 10:? " press <return> to change the"5410? " values on the medium..."5420GET go$:IF go$<>CHR$(13) GOTO 10005500VTAB 10:? " verifying SmartFILER...":?5510FOR x=1 TO LEN(fi$):POKE 27647+x, ASC(MID$(fi$, x, 1))5520NEXT5530POKE f2, dv%:CALL f15540 er%=PEEK(27647):VTAB 10:IF er%=0 GOTO 60005550IF er%=5 GOTO 56005560? " I/O error!!!":END5600? " Not SmartFILER medium!!!":END6000? " changing values..."6100REM fix the line feed on hardcopy bug6110POKE b2, d,0,108,33,160,253,205,204,252,50,255,107,201140FOR x=27620 TO 27634:READ mc:POKE x, mc:NEXT150 b1=27600: b2=b1+1: b3=b1+6: b4=b1+12155 f1=27620: f2=f1+1160 fi$="SMART_FILER"+CHR$(3): es$=CHR$(27):DIM co$(15)170FOR x=1 TO 2:READ dv$(x):NEXT:DATA tape one,disk one180DATA black,medium green,light green,dark blue,medium blue190DATA dark red,cyan,medium red,light red,dark yellow200DATA light yellow,dark green,magenta,gray,white210FOR x=1 TO 15:READ co$(x):NEXT1000TEXT:? " This program allows you to"10 LEN(x$)=1 THEN  x$=" "+x$30020? " "; x$; " = "; co$(x):NEXT:RETURNto change the"5410? " values on the medium..."5420GET go$:IF go$<>CHR$(13) GOTO 10005500VTAB 10:? " verifying SmartFILER...":?5510FOR x=1 TO LEN(fi$):POKE 27647+x, ASC(MID$(fi$, x, 1))5520NEXT5530POKE f2, dv%:CALL f15540 er%=PEEK(27647):VTAB 10:IF er%=0 GOTO 60005550IF er%=5 GOTO 56005560? " I/O error!!!":END5600? " Not SmartFILER medium!!!":END6000? " changing values..."6100REM fix the line feed on hardcopy bug6110POKE b2, d,207,252,50,255,107,201330FOR x=28690 TO 28704:READ mc:POKE x, mc:NEXT340DATA                                                      62,4,1,0,0,17,0,0,33,0,116,205,246,252,50,255,107,201350FOR x=28705 TO 28722:READ mc:POKE x, mc:NEXT400REM bootstrap routine (VRAM setup)410DATA 1,128,1,205,32,253420DATA 1,2,0,205,32,253430DATA 33,0,0,62,4,205,41,253440DATA 33,0,32,62,3,205,41,253450DATA 33,0,24,62,2,205,41,253460DATA 6,3,33,0,24,175,197,245,229,17,1,0,205,38,253470DATA 225,241,35,60,32,242,193,16,2310REM "BootPic Deluxe"20REM writen by DIGITAL EXPRESS30REM presented in Nibbles & Bits40REM October 198750REM if you exit the program, you can recover your graphics51REM screen by entering the graphic command (GR,HGR,orHGR2)52REM and then entering gosub 1060053REM for example, "HGR2:GOSUB 10600:GET k$:RUN"100IF PEEK(259)<>195 GOTO 10100110LOMEM :45000:POKE 16149, 255:POKE 16150, 255:             im=PEEK(17008)115GOSUB 10400:FOR x=108*256 TO 112*256-1:POKE x, 0:NEXT120DATA 33,0,116,17,0,48,6,0,11246,211,224600DATA 17,0,15,27,122,179,32,251,5,16,234,62,159,211,224610REM (boot SmartBASIC V1.0)620DATA 58,111,253,6,1,33,10,203,205,192,252,194,231,252630DATA                                                      1,0,112,33,0,1,205,210,252,194,231,252,62,1,205,195,252640REM (correct default drive)650DATA 58,111,253,50,1,65   660REM (begin BASIC)670DATA 195,0,1680DATA -1700 st=27648: tt=0710READ mc:IF mc=-1 GOTO 730720POKE st, mc: st=st+1: tt=tt+mc:GOTO 710730IF st=27861 AND tt=23317 GOTO 10007O LEN(k$):POKE x+27634, ASC(MID$(k$, x, 1)):NEXT250FOR x=1 TO LEN(k$):POKE x+28415, ASC(MID$(k$, x, 1)):NEXT260 j$="BASICPGM"+CHR$(2)+CHR$(3)270FOR x=1 TO LEN(j$):POKE x+28425, ASC(MID$(j$, x, 1)):NEXT280 cv%=PEEK(25431):IF im=1 THEN  cv%=PEEK(18607)300DATA                                                      62,4,33,243,107,17,0,44,1,0,0,205,201,252,50,255,107,201310FOR x=28672 TO 28689:READ mc:POKE x, mc:NEXT320DATA                                                      62,4,17,243,107,33,160,253,205v%:POKE b3, 18:POKE b4, 243:CALL b16120IF PEEK(27647)<>128 THEN VTAB 10:GOTO 55606130POKE 28411, 1:POKE b4, 246:CALL b16140IF PEEK(27647)<>0 THEN VTAB 10:GOTO 55606200REM change the screen colors6210POKE b2, dv%:POKE b3, 15:POKE b4, 243:CALL b16220IF PEEK(27647)<>128 THEN VTAB 10:GOTO 55606230POKE 28392, br%:POKE 28520, br%:POKE 28618, ft%*16+bk%6240POKE b4, 246:CALL b16250IF PEEK(27647)<>0 THEN VTAB 10:GOTO 55606300VTAB 10:? " SmartFILER patched...":END30000HOME:FOR x=1 TO 15: x$=STR$(x)30010IF7480DATA 1,15,7,205,32,253490DATA 1,192,1,205,32,253500REM (load picture file)510DATA                                                      58,111,253,17,0,203,33,160,253,205,204,252,194,231,252520DATA 237,91,173,253,33,0,116,6,12530DATA 197,58,111,253,1,0,0,213,229,205,243,252,225,209540DATA 194,231,252,1,0,4,9,19,193,16,231550REM (show picture)560DATA 33,0,116,17,0,0,1,0,24,205,26,253570DATA 33,0,140,17,0,32,1,0,24,205,26,253580REM (play sound effect)590DATA 6,30,62,128,211,224,120,211,224,62,1,35,27,122,179,32,249,201130FOR x=27600 TO 27615:READ mc:POKE x, mc:NEXT140DATA 1,0,0,17,0,0,33,0,116,205,0,253,201150FOR x=65520 TO 65532:READ mc:POKE x, mc:NEXT160DATA view graphics screen,set background color170DATA clear SmartPAINT title bar,begin storage,exit        program180FOR x=1 TO 5:READ m1$(x):NEXT190DATA 175,17,16,0,33,0,0,205,38,253,201200FOR x=27620 TO 27630:READ mc:POKE x, mc:NEXT210DATA tape one,disk one220FOR x=1 TO 2:READ dr$(x):NEXT230 k$="BootPic"+CHR$(2)+CHR$(3)240FOR x=1 T40TEXT:? "data entry error!!!"750? "check your data vaues":END1000IF im<>0 THEN GOSUB 105001010TEXT:? " This program creates a self-"1020? " booting graphics screen (GR,"1030? " HGR, or HGR2) on your Smart-"1040? " BASIC V1.0 backup.   Your"1050? " picture should already be on"1060? " screen when you first RUN this"; 1070? " program. Selecting option #"1080? " 2 from the menu will write"1090? " that screen to the disk as"1100? " a file.  And, it will write"1110? " a new bootstrap (block 0)"112procedure successful...":GOTO 509010000POKE 16953, 223:IF PEEK(17008)=0 THEN POKE 16953, 9510010END10100HOME:POKE 16953, 223:IF PEEK(17008)=0 THEN POKE 16953,  9510110? "program terminated!":END10200HOME:? " Which drive?"10210FOR x=1 TO 2:? " "; x; "="; dr$(x):NEXT10220GET dr$: dr%=VAL(dr$):IF dr%<1 OR dr%>2 GOTO 1022010240HOME:? " insert "; LEFT$(dr$(dr%), 4); " in the drive,"10300? " press any key to continue..."; 10310GET go$:?:RETURN10400HOME:? " one moment please...":RETURN10499REM read grany key to view the"2010? " graphics screen.  Then press"2020? " any key again for the menu.":GET go$2030IF im<>0 GOTO 21002040HOME:? " no screen to view...":GOTO 22002100IF im=1 THEN GR2110IF im>=2 THEN HGR22120GOSUB 106002200GET go$:GOTO 15003000HOME:INPUT " Enter color value (1-15): "; cv$3010 cv%=VAL(cv$):IF cv%<1 OR cv%>15 GOTO 30003020IF im=1 THEN POKE 18607, cv%3030IF im=2 OR im=3 THEN POKE 25431, cv%3040GOTO 20004000IF im<2 GOTO 15004010HGR2:GOSUB 106004020GOSUB 106004100FOR x=0 TO 2procedure successful...":GOTO 509010000POKE 16953, 223:IF PEEK(17008)=0 THEN POKE 16953, 9510010END10100HOME:POKE 16953, 223:IF PEEK(17008)=0 THEN POKE 16953,  9510110? "program terminated!":END10200HOME:? " Which drive?"10210FOR x=1 TO 2:? " "; x; "="; dr$(x):NEXT10220GET dr$: dr%=VAL(dr$):IF dr%<1 OR dr%>2 GOTO 1022010240HOME:? " insert "; LEFT$(dr$(dr%), 4); " in the drive,"10300? " press any key to continue..."; 10310GET go$:?:RETURN10400HOME:? " one moment please...":RETURN10499REM read graL 286905110POKE 64940, 146:POKE 64947, 12:POKE 64948, 05120POKE 64949, 0:POKE 64950, 45130POKE 28699, 207:CALL 286905140 sb=PEEK(64942)*256+PEEK(64941)5150IF PEEK(27647)=0 GOTO 60005160HOME:HTAB 2:GOTO 50706000POKE 28706, dv%:FOR x=0 TO 11:POKE 28711, x+sb6010POKE 28715, x*4+116:CALL 287056020IF PEEK(27647)=0 GOTO 60406030HOME:HTAB 2:? "block write error on: "; x+sb:GOTO 50906040NEXT x6100POKE 27709, cv%:POKE 28711, 0:POKE 28715, 108:CALL 287056110IF PEEK(27647)<>0 GOTO 60306120HOME:HTAB 2:? "0? " routine for SmartBASIC.":?:?1130? " You may use any size directory"; 1140? " and you may already have"1150? " files on the medium.  You can"1160? " use EZfileXFER (Sept 1987"1170? " issue) to transfer BASIC to"1180? " the medium later.  And, BASIC"1190? " will boot from ANY drive with"1200? " that drive as the default.":?:GOSUB 103001500TEXT:FOR x=1 TO 5:? " "; x; "="; m1$(x):NEXT1510GET k$: k%=VAL(k$):IF k%<1 OR k%>5 GOTO 15101520ON k% GOTO 2000, 3000, 4000, 5000, 101002000HOME:? " press aphics routine10500GOSUB 10700:POKE 65522, np:POKE 65530, 29:POKE 65525, 010510CALL 65520:POKE 65525, 32:POKE 65528, 140:CALL 6552010520POKE 65528, 116:RETURN10599REM recover graphics routine10600POKE 65522, 24:POKE 65530, 26:POKE 65525, 0:CALL 6552010610POKE 65525, 32:POKE 65528, 140:CALL 6552010620POKE 65528, 116:RETURN10700 np=20:IF im=3 THEN  np=2410710CALL 27600:RETURN906040NEXT x6100POKE 27709, cv%:POKE 28711, 0:POKE 28715, 108:CALL 287056110IF PEEK(27647)<>0 GOTO 60306120HOME:HTAB 2:? "3:POKE 27626, x:CALL 276204110POKE 27626, x+32:CALL 27620:NEXT:GOSUB 10500:GOTO 15005000GOSUB 10200: dv%=8/dr%:GOSUB 104005010POKE 28673, dv%:CALL 28672:IF PEEK(27647)=0 GOTO 51005020 er%=PEEK(27647):HOME:HTAB 25030IF er%=22 THEN ? "I/O error!":GOTO 50905040IF er%=24 THEN ? "not EOS directory!":GOTO 50905050IF er%=6 THEN ? "filename already exists!":GOTO 50905060IF er%=13 THEN ? "no more room!":GOTO 50905070? "file access error!"5090?:?:GOSUB 10300:GOTO 15005100POKE 28691, dv%:POKE 28699, 204:CAL10LOMEM :3210015REM     screen color change20REM     BY DAN ORLANDO 10/12/8430CLEAR: s=30000: x=31000: z=3200040 c=050DIM ck(15)90REM    background color routine100DATA    245,229,213,197,253,197105REM    black background color110DATA    14,1,6,7:REM    LDC,245;LDB,7115REM    store color in vdp register 7120DATA    205,32,253:REM    call FD20125REM    pop registers and return130DATA    253,225,193,209,225,241,201140DATA    256145REM    text color routine147REM    push registers150DATA    2440CALL 310001150GOTO 10401220TEXT1230END2000REM    color routine2010HOME:? "COLOR CODES"2015? co2020? " 1-BLACK         2-MED GREEN"2030? " 3-LT GREEN      4-DK BLUE"2040? " 5-LT BLUE       6-DK RED"2050? " 7-CYAN          8-MED RED"2060? " 9-LT RED       10-DK YELLOW"2070? "11-LT YELLOW    12-DK GREEN"2080? "13-MAGENTA      14-GRAY"2090? "15-WHITE         0-STOP"2100INPUT "BACKGROUND COLOR"; c12105IF c1<=0 THEN  co=0:RETURN2110INPUT "TEXT COLOR"; c22115IF c2<=0 THEN  co=0:RETURN2120IF c14,80,96,112210DATA    128,144,160,176,192,208,224,240890REM    store background color routine900READ a:IF a=256 THEN 930910POKE s+c, a920 c=c+1:GOTO 900930 c=0990REM    store text color routine1000READ a:IF a=256 THEN 10301010POKE x+c, a1020 c=c+1:GOTO 10001030FOR i=1 TO 15:READ ck(i):NEXT i1040GOSUB 2010:REM    print choices1050IF co=0 THEN 12201055REM    change background color1060POKE 30007, co1100CALL 300001105REM    change text color1110FOR i=0 TO 311120POKE z+i, ck(c2)1130NEXT i11302027GOTO 20102030INPUT "Enter the port #, Output Data  "; p, d2050POKE 28011, p:POKE 28013, d2060CALL 280072085?2090GOTO 20003000? "This program will allow you to access ADAM's I/O ports through"; 3010? "the keyboard. The I/O space is addressed from 0 to 255, with  the sound chip at 224 to 255;"3020? "the video at 160 to 191; and   the modem at 94 and 95."3025?:?3030? "To examine data at an input    port, type i then enter the    port number and <RETURN>."; 3040? "You   will see the port numbe=c2 THEN ? "COLORS IDENTICAL":GOTO 20102130IF c1>15 OR c2>15 THEN 20102140 co=c12150RETURNe900READ a:IF a=256 THEN 930910POKE s+c, a920 c=c+1:GOTO 900930 c=0990REM    store text color routine1000READ a:IF a=256 THEN 10301010POKE x+c, a1020 c=c+1:GOTO 10001030FOR i=1 TO 15:READ ck(i):NEXT i1040GOSUB 2010:REM    print choices1050IF co=0 THEN 12201055REM    change background color1060POKE 30007, co1100CALL 300001105REM    change text color1110FOR i=0 TO 311120POKE z+i, ck(c2)1130NEXT i115,229,213,197,253,197152REM    use color table-4155DATA    58,27,252:REM    LDA,(FC1B)157REM    number of entries160DATA    253,33,32,0:REM    LDY,32162REM    data is at 32000165DATA    33,00,125:REM    LDHL,7DOOH167REM    start at zer]167 rem start at entry zero170DATA    17,00,00:REM    LD DE,OH172REM    change textcolor vdp ram175DATA    205,44,253:REM    CALL FD2C177REM    pop registers and return180DATA    253,225,193,209,225,241,201185DATA    256195REM    color data200DATA    16,32,48,65REM   Brian Matteson 4/12/8510LOMEM :2900015HOME17GOTO 300020GOSUB 100021GOTO 200022INPUT "Input Port Number "; x40POKE i, x50CALL s60? "IN "; x; "= "; PEEK(c)72?75GOTO 20001000DATA          219,0,50,102,109,201,0,58,109,109,211,0,201,01040 s=28000: i=28001: c=280061060FOR a=s TO s+131070READ b1080POKE a, b1090NEXT a1100RETURN2000? "Type i to view port data.":? "Type o to output data."2002? "Type q to quit.":?2010GET a$2020IF a$="i" THEN 222025IF a$="q" THEN END2026IF a$="o" THEN 2040CALL 310001150GOTO 10401220TEXT1230END2000REM    color routine2010HOME:? "COLOR CODES"2015? co2020? " 1-BLACK         2-MED GREEN"2030? " 3-LT GREEN      4-DK BLUE"2040? " 5-LT BLUE       6-DK RED"2050? " 7-CYAN          8-MED RED"2060? " 9-LT RED       10-DK YELLOW"2070? "11-LT YELLOW    12-DK GREEN"2080? "13-MAGENTA      14-GRAY"2090? "15-WHITE         0-STOP"2100INPUT "BACKGROUND COLOR"; c12105IF c1<=0 THEN  co=0:RETURN2110INPUT "TEXT COLOR"; c22115IF c2<=0 THEN  co=0:RETURN2120IF c1r listedalong with the input data."3045?:?3050? "To output data, type o followedby the port number, then a     comma followed "; 3060? "by the data;    then hit <RETURN>."3070?:?3080? "Hit any key to continue."3090GET a$3095HOME3100GOTO 2001040 s=28000: i=28001: c=280061060FOR a=s TO s+131070READ b1080POKE a, b1090NEXT a1100RETURN2000? "Type i to view port data.":? "Type o to output data."2002? "Type q to quit.":?2010GET a$2020IF a$="i" THEN 222025IF a$="q" THEN END2026IF a$="o" THEN 20:FOR i=30000 TO 31023: x=PEEK(i)210FOR j=0 TO 14:IF x=c(j) THEN  x=46220IF PEEK(64885)=27 THEN 310230NEXT300? CHR$(x); :NEXT310?:?:? " ANOTHER BLOCK? (y/n) ":GET a$:IF a$="y" OR a$="Y" THEN HOME:GOTO 100320END1000DATA                                                     62,0,33,48,117,17,0,0,1,0,0,205,243,252,201,0,7,8,10,12,13,16,24,127,128,136,143,160,161,162,16310REM    ADAM 15REM    PUBLIC DOMAIN  20REM    COLOR CALCULATOR30REM    BY JOSEPH SHEPPARD35REM    CIS ID# 73175,62340HOME:?200? " Color Codes: ":?205? " 1-Black"210? " 2-Medium Green"215? " 3-Light Green"220? " 4-Dark Blue"221? " 5-Light Blue"222? " 6-Dark Red"223? " 7-Cyan"224? " 8-Medium Red"225? " 9-Light Red"226? "10-Dark Yellow"227? "11-Light Yellow"228? "12-Dark Green"229? "13-Magenta"230? "14-Gray"231? "15-White"232? "16-Stop":?240INPUT "Background Color "; b250IF b>16 GOTO 4lete (no enhanced sound or graphics!!) version of Smart-BASIC dubbed 2.0 has found its way into the "Adam underground" in what amounts to a beta-testing form.  Having obtained a working copy of my own, I've spent  some hours checking it out and comparing its features with those of the V1.0   we've all come to know and love/hate.  The following somewhat scattered notes  summarize my discoveries to date.     (1) SmartBASIC II occupies 49 blocks on the disk, in contrast to SB I's   mere 28K.  The file size 5LOMEM :3110010DIM c(15):HOME20FOR i=28000 TO 28014:READ x:POKE i, x:NEXT:FOR i=0 TO      15:READ c(i):NEXT30? " BLOCK-PEEK UTILITY":?:? " TAPE #1 - 1":? " DISK #1 -   5":?:? " Select Drive --> "; 40GET a$:? a$: a=VAL(a$):IF a<>1 AND a<>5 THEN INVERSE:? "   INVALID DRIVE #":NORMAL:VTAB 1:GOTO 3050 x=8:IF a=5 THEN  x=460POKE 28001, x100?:? " READ AND DISPLAY BLOCK:":?:? " <ESCAPE> to STOP     DISPLAY":?:INPUT " Block #? "; n$110IF n$=CHR$(27) THEN END120 n=VAL(n$)180POKE 28006, n:CALL 28000200HOME302027GOTO 20102030INPUT "Enter the port #, Output Data  "; p, d2050POKE 28011, p:POKE 28013, d2060CALL 280072085?2090GOTO 20003000? "This program will allow you to access ADAM's I/O ports through"; 3010? "the keyboard. The I/O space is addressed from 0 to 255, with  the sound chip at 224 to 255;"3020? "the video at 160 to 191; and   the modem at 94 and 95."3025?:?3030? "To examine data at an input    port, type i then enter the    port number and <RETURN>."; 3040? "You   will see the port numbexOter "NEW"].        Compare this with the value of 26391 [26401 after "NEW"] in SB II's standard   memory configuration.  To reload the standard configuration (and clear thNOTES ON SMARTBASIC 2.0by George A. Havach [CompuServe ID #70337,3062]     Though never finally released by Coleco (who terminated the project       shortly before discontinuing further Adam production and development), a       revised, still incomp0260IF b<0 GOTO 40261IF b=16 THEN HOME:NEW265INPUT "Text Color "; t270IF t>16 GOTO 40275IF t<0 GOTO 40276IF t=16 THEN HOME:NEW280 x=t*16+b290POKE 17115, x:TEXT300VTAB 10310? "To get this color combitnation"320?:? "use:"330?:?:HTAB 5340? "POKE 17115,"; x; ":TEXT"re buffer closed.[73175,623]COLOR.BAS      23-Apr-85 825Disposition:1 (R)    ReazCapture buffer closed.[75766,1563]SMARTM :GOTO 87008770ON ch% GOSUB 8900, 9200, 70008780GOTO 87008900HOME:VTAB 10:HTAB 2:? "in entering a nis so unexpectedly large because SB II COMES WITH ITS OWN OPERATING SYSTEM ON BOARD--true Revision 7 of EOS (different from the ROM-chip version built into the Adam)--which is overlaid onto the RAM-resident     version at startup, beginning at address E4B8H on up.  According to Joel K.    Lagerquist, author of the revisions to SmartBASIC that were incorporated into  V2.0, this revision comes equipped with all the fixes to EOS' file-handling    functions that enable SB II to work "much faster" with data filssage by SB II is accompanied by a "beep"       (CHR$(7)).  Furthermore, a touch of humor--and genius--has been added to the   way numbered program lines are accepted (or not) by the interpreter. Previ-ously, any line containing a syntax ("Illegal Command") error was simply       rejected by SB I.  Now, the offending line will still be normally redisplayed  with a caret pointing to where the error occurred, but in addition, SB II      prints a "happy face" (CHR$(2)) as the first character after the line nu4K Memory Expander.  Also, SB II will boot   from ANY drive and set that as the active one, whereas SB I defaults to data-pack drive 1 unless patched otherwise (byte 2 of block 18:  4 = disk drive 1,  8 = data-pack drive 1).     (3) The default value of HIMEM (53632) is identical in the two versions,  but LOMEM is lower in SB II:  26960 versus 27407 (the same difference as for   FRE(0)).  Also, the system-parameter area (see SmartBASIC Guide, p. C-23) has  been moved:  for example, the "LOMEM setting" isine and cancel the incorrect version.  The      program, of course, will not run properly until all these troublesome lines    are fixed.     (7) Four of the special-function keys ("hardkeys") are software-labeled   to function for line editing in SB II:  CLEAR works like CONTROL-X (cancels a  line input), INSERT like CONTROL-N (opens up a space leftward of the cursor),  DELETE like CONTROL-O (closes up the space beneath the cursor), and PRINT like CONTROL-P (dumps the screen to the printer).  The screen  make SB II worth       having, just to be able to save programs within a minimum of file space.     (5) The cursor-display routine has been rewritten in SB II, so now the    underline cursor character DISAPPEARS while either executing an immediate      command or running a program, reappearing only on return to command mode. This makes for a "cleaner" screen display, but it's no longer possible to change or blank the cursor character with a single POKE (to 16953 in SB I).     (6) Return of any error mees opened by    SmartBASIC programs.  Thus, SB II is apparently capable of correctly opening   and read/writing random-access files, whereas SB I seems full of bugs in this  department, in spite of what the Coleco manual (pp. C9-C10) would lead you to  believe.  Furthermore, SB II takes up almost 500 bytes LESS runtime memory     than SB I:  a FREe space of 26401 [after NEW] versus 25954 bytes.     (2) The cold-start loader ('BOOT' block 0) is all new code and includes a RAM test for the presence of the 6mber.  And if you LIST the program, any erroneous lines are RETAINED IN THE PROGRAM,  but their presence is unmistakably signaled by a "beep" during the listing!    This means a potentially great savings of time and retyping while programming: buggy lines now can be corrected AT ANY TIME DURING PROGRAM DEVELOPMENT,       simply and easily by running the cursor over the line (skipping over the       "happy face" with a CONTROL-right arrow), making the needed changes, and then  hitting RETURN to reenter the l at 16095 in SB I, but at 1594 in SB II.  More interesting, LOMEM and HIMEM can now be simultaneously reset;  in SB I, you can change EITHER one, but then trying to change the other gives  you an "Out of Memory Error."     (4) Both the REM and DATA statements have been fixed for the bug in SB I  that keeps inserting a space after them on a program line each time the        program is SAVEd or LOADed.  In fact, SB II specifically strips out any extra  leading spaces when LISTing.  This single feature mightdump, however, is now INTERRUPTABLE WITH A CONTROL-C, and if the CONTROL-C is issued during a screen dump activated from within a program (e.g., by PRINT CHR$(16)), control passes to the next step without a "Break."     (8) Line length (actually, the size of the line buffer) in SB II is       expanded to 255 characters, versus SB I's 127.     (9) Use is made of an RST 38 interrupt vector that involves updating the  spinner (the spool on the Super Action Controller), evidently with game design in mind.high nibble) and block-background (low                    nibble) colors     (15) The two new commands STDMEM and EXTMEM have been added to SB II to   permit switching between standard memory (64K RAM plus 16K VRAM; also the      default configuration) and extended memory, which uses the 64K Memory Expander (if present) in much the same manner as SmartWriter uses this extra RAM to     expand its workspace, i.e., through a bank-switching arrangement.  To load the bank-switched configuration (which takes u disk will replace the corresponding lines in memory.          (MERGEing may be thought of as 'inserting' the program lines on disk into the  program in memory.)"  This single addition greatly facilitates "modular"       programming, and makes SB II particularly valuable for larger writing          projects.     (12) The INIT command in SB II assigns the correct number of "Blocks      Free" when used to blank out the directory and reinitialize a disk, whereas SB I treats a disk the same as a data pack, anorkspace), enter "STDMEM", again with the source disk in the drive; the       screen will blank, the disk will spin, and the title screen will reappear. The MEMORY MAP seems to be quite different in these two configurations; things     really get moved around, so watch out!  For example, LOMEM and HIMEM don't     seem to have the same error checking in EXTMEM, and so entering an illegal     value can cause an immediate system crash!  Also, programs will generally RUN  MORE SLOWLY (about half as fast) in EXTerpreter of SB I--and    programs that use them--will NOT work in SB II, since it has been completely   recompiled.  In many cases, however, corresponding locations can be found with a little investigation.  Among the more useful are the POKEs to change the     screen and character colors (SB I addresses in parentheses):     17184 (17059)  border color (0-15)     17240 (17115)  normal-character (high nibble) and display-screen (low                    nibble) colors     17251 (17126)  inverse-character (     (10) The BREAK and NOBREAK commands (tokens 64 and 65) have been deleted  from SB II, but STORE, RECALL, and SHLOAD have not, and they're just as NON-FUNCTIONAL as in SB I!     (11) The new MERGE command works beautifully, in precisely the same way   as in Microsoft BASIC:  "Format:  MERGE <filename>[,Dn].  Merges a specified   disk file into the program currently in memory....If any lines in the disk     file have the same line numbers as lines in the program in memory, the lines   from the file onp much of that extra space in the SB II disk file), enter "EXTMEM" WITH THE SOURCE DISK STILL IN THE DRIVE.  The    disk will spin, the screen will blank, and after a few seconds the title       screen will reappear.  To get some idea of the size of your new workspace,     enter "PRINT FRE(0)"; the value 90646 is displayed [90656 after "NEW"].        Compare this with the value of 26391 [26401 after "NEW"] in SB II's standard   memory configuration.  To reload the standard configuration (and clear the     wd so 'CATALOG' shows an impossible  "253 Blocks Free"!     (13) While SB I sets an upper limit to use of the POKE command of 54160   (D390H, the start of the FCB-header area), SB II raises this limit nearly to   the top of RAM, to 65216 (FEC0H, the beginning of the DCB/FCB area).  You can  override this limit by POKEing 255 to addresses 16149 and 16150 in SB I, or to 1648 and 1649 in SB II; then you can POKE anywhere in memory--at your own      risk!     (14) In general, special POKEs into the BASIC intMEM than in STDMEM, because of all the  extra CPU time spent in bank switching.  That's the way it goes!     (16) High-resolution graphics have supposedly been fixed in SB II to      eliminate the problem of "video bleed" when HPLOTing or DRAWing in adjacent    pixels, but the few simple tests I've run indicate that the color-bleed        problem is AS BAD AS, IF NOT WORSE THAN, IN SB I.  Nonetheless, THE BIG NEWS   IS THAT SB II IS CAPABLE OF HANDLING SPRITES!  It does this through the "DRAW" and "XDRAW"hip), numbered  1 through 32.     (17) SB II has a built-in function for displaying ANY character on the    screen at the current cursor position (in TEXT mode), even the control-character symbols below ASCII 32.  To utilize this function, POKE the ASCII    code into address 16771, then CALL 16770.  This function interprets the code   as a displayable character, NOT a control code, so you can print even the      characters equivalent to a linefeed (10, a Greek "pi") or carriage return (13, a left-pointinou can view them by the       following interaction:     POKE 16788, 1: HOME     HCOLOR = 3: DRAW 1 AT 100, 50: DRAW 2 AT 100, 100This will display sprite 1 as a sailboat and sprite 2 as a communications      satellite!  The format for creating your own sprites is EXACTLY THE SAME AS    FOR SHAPES IN SMARTLOGO, as described in the SmartLogo Reference Manual (pp.   72-74); each sprite is a 32-byte string of hexcodes.  A maximum of 32 sprites  is allowable (the limit for simultaneous display by the video cat they do, why they do it    and perhaps learn how you can     utilitze a routine from here in your own    basic programs.Since I am not much further along than you, some lines I     will be able to  explain , ^Imy explanations will show up in italics and are not part of   the program & should not be    typed in when running it.^F^J.Comments are also accepted and appreciated.Follow the program line by line BUT when the program has you GOTO another line or GOSUB another line you should then jump forward g arrowhead).  Try this short program:     10 HOME: FOR char = 1 to 127: POKE 16771, char: CALL 16770: PRINT " "; :        NEXTwhich will show a staggered screen display of the entire Adam character set,   from ASCII 1 (a centered dot) through 127 (a flashing cursor).TLY THE SAME AS    FOR SHAPES IN SMARTLOGO, as described in the SmartLogo Reference Manual (pp.   72-74); each sprite is a 32-byte string of hexcodes.  A maximum of 32 sprites  is allowable (the limit for simultaneous display by the video c commands--and these work IN ALL THREE SCREEN-DISPLAY MODES:  TEXT, GR, and HGR/HGR2.  To activate this function, first POKE a nonzero value into  address 16788 (the shape/sprite flag; default value is 0); addresses 16786 and 16787 hold the pointer to the starting address of the sprite table, low byte   first (the default table is at 192 decimal).  A sprite table can be located    anywhere in memory you choose, with its address POKEd into these two bytes.    There are TWO default sprites already provided; yEDITORS, NOTE THE ^I means start italics and the ^F^J means  end italics.   These portions should be set off from the     others by italics, underline,etc. as they are NOT part of    the program but explanations to help beginners better        understand the programs.       P.D. PROGRAM & EXPLANATION      Here is another fairly simple PD game program which you can  type in and   run . It is offered for your entertainment but is also a good way  for beginners in basic to review the program lines, see whhip), numbered  1 through 32.     (17) SB II has a built-in function for displaying ANY character on the    screen at the current cursor position (in TEXT mode), even the control-character symbols below ASCII 32.  To utilize this function, POKE the ASCII    code into address 16771, then CALL 16770.  This function interprets the code   as a displayable character, NOT a control code, so you can print even the      characters equivalent to a linefeed (10, a Greek "pi") or carriage return (13, a left-pointinto that line and  continue from there until you hit  a line with RETURN in it, at that point you return to the    previous program line that had the GOTO or GOSUB             command and then continue on from there.1 REM     PRINT "SHELL GAME" ^I A REM(ark) for programmers   info only.^F^J10HOME ^IClears the screen to start game^F^J20 rv$=CHR$(27): nv$=CHR$(27) ^Idefines rv$ & nv$ to mean    CHR$(27)^F^J50? rv$; " SHELL GAME "; nv$ ^I? is same as PRINT & prints   to screen rv$  & nv$ on each side of "SHb-routine^F^J600HPLOT 55, 37 TO 69, 50  ^IPlots part of the game's simple graphics^F^J610HPLOT 115, 37 TO 129, 50620HPLOT 175, 37 TO 189, 50630? "p"640RETURN700HPLOT 55, 37 TO 69, 50710HPLOT 115, 37 TO 129, 50720HPLOT 175, 37 TO 189, 50730? "p"740RETURN800HPLOT 55, 37 TO 69, 50810HPLOT 115, 37 TO 129, 50820HPLOT 175, 37 TO 189, 50830? "p"840RETURN900HPLOT 55, 37 TO 69, 50910HPLOT 115, 37 TO 129, 50920HPLOT 175, 37 TO 189, 50930RETURN1000HPLOT 55, 37 TO 69, 501010HPLOT 115, 37 TO 129, 50 195 ^I IF k$(key press) was p it sends     program to line  l95 skipping anything in between.^F^J180IF k$="r" THEN 1100182IF k$="q" THEN 1300190GOTO 150  ^IAgain if not right key was pressed, it        returns program to  line l50 to wait for key press^F^J195 a=1: b=2: c=3  ^Isets values of a,b,c^F^J198? SPC(93)200? "          ***** ***** *****"205? "          * "; a; " * * "; b; " * * "; c; " *"208? "          ***** ***** *****"220GOSUB 900 ^ISends program to subroutine at line 900^F^J300GET k$1180? "COMPUTER SHOWS NUMBER OF"1182? "RIGHT GUESSES & WRONG GUESSES."1190? "TO END THE GAME ANYTIME,"1192? "PRESS 'ESCAPE/WP' KEY."1194?:?1196? "NOW TYPE 'CONT' TO BEGIN GAME."1198STOP^I after giving you the rules it stops the program,  which will    print break in program on screen. But typing   CONT will allow the program  to start up again^F^J1200 IF  k$="" THEN 12101210HOME:GOTO 501300HOME ^I sub-rotuine if e or e(nd) of game was            pressed.^F^J1310? rv$; " END OF GAME "; nv$1312?:?ow another     right answer and you are sent to line 420 ^F^J410 w=w+1  ^IIF not r(ight) then it must be w(rong) and      number wrong or w is increased by l to w+ 1.^F^J420? r; "RIGHT"  ^IPrints number r(ight)^F^J430? w; "WRONG" ^IPrints number w(rong)^F^J440GOTO 220 ^Irecycles thru line 220^F^J500FOR q=1 TO VAL(RIGHT$(k$, 2)): x=INT(4*RND(1)):NEXT q     ^Isets random    number factor^F^J510IF x<1 THEN 500520RETURN  ^Ireturns from this sub-routine to the program    line which sent program to this suELL GAME" & also     prints SHELL GAME on screen     ^F^J52?:?  ^IPRINT:PRINT prints two blank lines for spacing^F^J105? "FOR RULES"; SPC(3); "PRESS r" ^I Prints FOR RULES,     spaces 3 times   PRINTS PRESS r all to screen^F^J110? "TO PLAY"; SPC(5); "PRESS p"140? "TO QUIT"; SPC(5); "PRESS q"150GET k$  ^IAfter giving you your 3 choices it waits for a  k$(key press) ^F^J160IF k$="" THEN 150  ^IIF no key press from choices,        recycles back to    line l50 and waits for key press^F^J170IF k$="p" THEN1020HPLOT 175, 37 TO 189, 501030RETURN1100HOME  ^Ithis sub-routine comes into play if r or r(ules) was picked   and it prints out a simple graphic and prints   out the rules on the        following lines^F^J1110? rv$; " RULES "; nv$1112?:?1120HPLOT 95, 7 TO 125, 151130HPLOT 93, 5 TO 127, 171140? "A 'PEA' IS UNDER ONE CUP?"1142? "WHICH: NUMBER 1,2, OR 3?"1144? "THE COMPUTER SHUFFLES THE CUPS."1150? "AFTER EACH GUESS. TO GUESS"1152? "AGAIN,PRESS NUMBER OF CUP."1160IF k$="" THEN 11601170? SPC(93)310IF k$="" THEN 300315IF ASC(k$)=27 THEN 10320IF VAL(k$)<1 OR VAL(k$)>4 THEN 300330GOSUB 1000340GOSUB 500350ON x GOSUB 800, 700, 600360FOR t=1 TO 500:NEXT t ^IA delay cycle where computer      counts from l to  500 before doing anything, it counts       faster than we do^F^J400IF VAL(k$)=x THEN  r=r+1:GOTO 420 ^IHere computer is      comparing your    key stroke to the value x it has chosen to show where the pea was under   the shell, IF they are = then r, the number right is increased to r+l to  sh:?1320HPLOT 89, 7 TO 155, 151330HPLOT 87, 5 TO 157, 171340? "WERE YOU LUCKY?"1342? "IF NOT MAYBE NEXT TIME."1350END ^IEnds the program and the game leaving you in       SmartBasic^F^JHOPE YOU ENJOY.    Barry WilsonRULES "; nv$1112?:?1120HPLOT 95, 7 TO 125, 151130HPLOT 93, 5 TO 127, 171140? "A 'PEA' IS UNDER ONE CUP?"1142? "WHICH: NUMBER 1,2, OR 3?"1144? "THE COMPUTER SHUFFLES THE CUPS."1150? "AFTER EACH GUESS. TO GUESS"1152? "AGAIN,PRESS NUMBER OF CUP."1160IF k$="" THEN 11601170? SPC(93)you   look at the core of DOS, you will find, unchanged even to DOS  4.01, the CP/M   method making operating system calls--for the DOS functions  that were available  in DOS 1.0, that is. If you move the function number  into the CL register,   then make an absolute CALL 5, this invokes the DOS  functions more commonly     invoked with the INT 21H mechanism. There is a big  discussion of the "CP/M"       method in the Technical Reference section of the  DOS 2.0 manual (which the rats at  IBM have re     A41 00:20 Dec-02-1990    TO: Rich Drushel  FROM: Ron Collins 3  SUBJ: DRI vrs DEC  Rich,        Digital Research was founded back in 1973 when Dr. Gary Kildall came  up with an   OS that could be transportable from system to system. The new OS  was called  CP/M. Gary even marketed his own computer system to use the new  OS. In a short  space of time, over 300 varieties of CP/M compatible  computers came into        being.... one of them being the DEC. SOme of the big  names of the day were thingsmpile it, never mind the .EXE file   is about 4 times  the size of an equivalent straight-machine-code .COM file. Regards, Rich  Drushel #36     hat were available  in DOS 1.0, that is. If you move the function number  into the CL register,   then make an absolute CALL 5, this invokes the DOS  functions more commonly     invoked with the INT 21H mechanism. There is a big  discussion of the "CP/M"       method in the Technical Reference section of the  DOS 2.0 manual (which the rats at  IBM have resions of CP/M that have been fully solved and       recoded by Tony Morehen in  his T-DOS program. MSDOS 4.01 still has those early bugs  in it after all  this time. * Ron *     A42 07:51 Dec-02-1990    TO: Ron Collins  FROM: Richard F. Drushel 36  SUBJ: MS-DOS and CP/M    Yes, I knew that the original operating system for the IBM-PC was supposed  to be CP/M. Some EARLY application programs were even written supposing  that an 8086 emulation of CP/M was going to be the operating system. In  fact, if 1180? "COMPUTER SHOWS NUMBER OF"1182? "RIGHT GUESSES & WRONG GUESSES."1190? "TO END THE GAME ANYTIME,"1192? "PRESS 'ESCAPE/WP' KEY."1194?:?1196? "NOW TYPE 'CONT' TO BEGIN GAME."1198STOP^I after giving you the rules it stops the program,  which will    print break in program on screen. But typing   CONT will allow the program  to start up again^F^J1200 IF  k$="" THEN 12101210HOME:GOTO 501300HOME ^I sub-rotuine if e or e(nd) of game was            pressed.^F^J1310? rv$; " END OF GAME "; nv$1312?:?moved from subsequent  manuals--you have to PAY EXTRA for technical info now). Apparently what  they were going to do was adapt the CP/M function numbers and register  setups to 8086 registers, then use CROSS ASSEMBLERS  to go from 8080/Z80 code  to 8086 code. In the days when most application        software was still written  in straight machine code, this would have been a major timesaver. Now, they  assume that RAM goes on for ever and write source    code in C or Pascal or  MicroSoft BASIC and co   like Osborn, Morrow, Kaypro, Ottrana and even  the TRS-80 line! All were Z80    based. When approached by IBM to do the OS  for their new line of microcomputers, Gary left them waiting in the lobby  while he took a 3 hour horse-back ride.    IBM went to MicroSoft who then  based MSDOS on what they new of CP/M. The ADAM version of CP/M is one of  the most full featured for any computer able to use CP/M as wee use basic  Heath codes and support color, etc. There were and  are bugs in most known  verTHE FOLLOWING WAS DOWNLOADED FROM THE CIS Adam Board with    its congenial host and Master of Ceremonies Rob Friedman.Since this involves a hardware modification to your Adam, BE WARNED THAT A.N.N., CIS, ANY BBS OR NEWSLETTER USING THIS    FILE OR ANY OF THEIR OFFICERS, EDITORS, MEMBERS, ETC. MAKE   NO CLAIMS, WARRANTIES, GUARANTEES, ETC. AS TO THE SAFETY TO  YOU OR YOUR EQUIPMENT FROM THIS MODIFICATION.  ANYONE MAKING SUCH A MODIFICATION DOES SO AT THERE OWN RISK. WE MERELY REPEAT THIS MESSAGE WITHOUT . I wasn't too surethat I should tell anyone as it might damage their equipment so I waited andI'm prouto say that my ADAM and my neighbor's ADAM have      been working and haveeliminated the need to drill those hles.  I know that        you're probably saying"They put those things there for a ourpose" well I'm telling you that the onlypurpose that they served was to keep you buying the tapes    from Coleco, butsince their gone lets not keep doing this to ourselves.  As  a token of goodwill I havematter have to drill holes in the top corners.  WEll a few years back before the megacopy(which I do own) I       perfected a way toduplicate tapes from standard stereo equipment(but that§s    another story, Iwouldn't want Syd Carter mad at me) anyway I got fed up with drilling the holeseach time as it simply bugged the heck out of me so I took a pair of toenailclippers and snipped out those annoying little tabs in the   drive and low andbehold the critters kept on working even better than beforeSUB 800, 700, 900:PR #090END97REM ********************98REM Find Field End99REM ********************100 c=PEEK(x)110IF c=3 THEN GOTO 160120 c$=CHR$(c)130 f$=f$+c$140 x=x+1: y=y+1150GOTO 100160RETURN197REM ********************198REM Load Field to Table199REM ********************200GOSUB 500210 r$(record, field)=f$220 f$=""230? "r="; record; " f="; field; " y="; y240RETURN297REM ********************298REM Find Next Field299REM ********************300 c=PEEK(x)310IF c=3 THEN  x=x+1: y=y a couple of spare Drives and the first person    who tries this andscrews up their drive and it is clear that it is a direct    result from removingthese tabs can get a new drive from me provided they give me the old one firstand I test it and find it to have been my mistake.  TRUST ME I'm saving youtime and money. the heck out of me so I took a pair of toenailclippers and snipped out those annoying little tabs in the   drive and low andbehold the critters kept on working even better than beforeMAKING ANY COMMITTMENT AS TO ITS EFFICACY, SAFETY, FEASIBILITY OF THIS              MODIFICATION.  RATHER WE SPECIFICALLY STATE THAT YOU SHOULD  ONLY ATTEMPT THIS IF YOU ARE AN EXPERT AT HARDWARE,          MECHANICS, ETC. AND EVEN THEN ONLY AT YOUR OWN RISK.22-Dec-90  21:06:46  Sb: Simple TrickFm: AlexandeChaney    To: Tim Gatewood I think this may be out of context, but I think it may save  people a bit of time.Most people when making DATA packs from SONY tapes or        anyother tapes for that1REM ezfprint2REM Joe Alford, Nov 19903REM formats and prints ezfiler storage4REM 30 records, 256 bytes each, begin at 276485REM 27647 has number of records left of 30 original7DIM r$(30, 12)8 f=27648: x=f:POKE 16953, 959GOSUB 400:REM Load File10FOR record=1 TO e:REM e=record count15 y=0:REM y=character within record20FOR field=1 TO 1230GOSUB 100:REM Find Field End (c=3)40GOSUB 200:REM Load Field to Table50GOSUB 300:REM Find Next Field60NEXT field70NEXT record80ON po GOSUB 1400, 1410:ON p GO. I wasn't too surethat I should tell anyone as it might damage their equipment so I waited andI'm prouto say that my ADAM and my neighbor's ADAM have      been working and haveeliminated the need to drill those hles.  I know that        you're probably saying"They put those things there for a ourpose" well I'm telling you that the onlypurpose that they served was to keep you buying the tapes    from Coleco, butsince their gone lets not keep doing this to ourselves.  As  a token of goodwill I have+1:GOTO 300320RETURN397REM ********************398REM Menu 399REM ********************400GOSUB 1300:TEXT410?:? " File = "; n$420? " Records = "; e:?430? " 1 = Dump (1 field/line)"440? " 2 = List (2 lines/record)"450? " 3 = Mailing Labels (3 across)"460?:INPUT " Enter Processing Option "; p470IF p<1 OR p>3 THEN 460480RETURN497REM ***************498REM Field Break Routine499REM ***************500IF y>235 THEN  field=12:GOTO 620510IF y>220 THEN  field=11:GOTO 620520IF y>205 THEN  field=10:GO320? CHR$(4); " bload "; n$; " ,A27647"1330 e=30-PEEK(27647)1340?:? " 1) ADAM Printer"1350? " 2) Dot Matrix"1360?:INPUT " Enter Printer option "; po1370IF po<1 OR po>2 THEN 1701380RETURN1397REM ********************1398REM Set Printer Option1399REM ********************1400PR #1:RETURN1410PR #2:RETURNN(r$(x, 4))1030 s=28-s:GOSUB 6501040? r$(x+1, 4); 1050 s=LEN(r$(x+1, 4))1060 s=28-s:GOSUB 6501065IF x+2>e THEN ?:GOTO 10801070? r$(x+2, 4)1080? r$(x, 5); ", "; r$(x, 6); spc(1); r$(x, 7); 1090*********700FOR x=1 TO e710? r$(x, 1); ", "; r$(x, 2); 720 s=LEN(r$(x, 1))+LEN(r$(x, 2))730 s=51-s740GOSUB 650:? r$(x, 9)750 s=5:GOSUB 650:? r$(x, 4); ", "; r$(x, 5); ", "; r$(x, 6); " "; r$(x, 7)760NEXT x770RETURN797REM ********************798REM Dump (1 field/line)799REM ********************800FOR x=1 TO e810FOR y=1 TO 12820? r$(x, y)830NEXT y840? "*****"850NEXT x860RETURN897REM ********************898REM Mailing Labels (3 up)899REM ********************900?:?910 x=1920? r$(x, 2); "repare files for sort40GOSUB 6000:REM merge files - routine from ezFILER50GOSUB 400:REM restore null records60GOSUB 500:REM Write 2 files70TEXT:? " ezfmerge has finished":?:? " "; f1$; " and "; f2$:? " have been merged into":? " "; f3$; " and "; f4$80?:? f3$; " has "; 30-c1%; " records":? f4$; " has "; 30-c2%; " records"90?:? " WARNING:  RERUN HELLO BEFORE":? " USING ezFILER or ezfprint"95END97REM ********************98REM Get 4 File Names    99REM ********************100TEXT:? "ezfmerge":?:?110 s=LEN(r$(x, 5))+LEN(r$(x, 6))+LEN(r$(x, 7))+31100IF x+1>e THEN ?:GOTO 11901110 s=28-s:GOSUB 6501120? r$(x+1, 5); ", "; r$(x+1, 6); " "; r$(x+1, 7); 1130 s=LEN(r$(x+1, 5))+LEN(r$(x+1, 6))+LEN(r$(x+1, 7))+31140IF x+2>e THEN ?:GOTO 11901150 s=28-s:GOSUB 6501160? r$(x+2, 5); ", "; r$(x+2, 6); " "; r$(x+2, 7)1170?:?:?1180 x=x+3:IF x<e+1 THEN GOTO 9201190RETURN1297REM ********************1298REM File Information1299REM ********************1300? CHR$(4); " catalog"1310INPUT "Enter File Name "; n$1TO 620530IF y>185 THEN  field=9:GOTO 620540IF y>165 THEN  field=8:GOTO 620550IF y>145 THEN  field=7:GOTO 620560IF y>125 THEN  field=6:GOTO 620570IF y>100 THEN  field=5:GOTO 620580IF y>75 THEN  field=4:GOTO 620590IF y>50 THEN  field=3:GOTO 620600IF y>25 THEN  field=2:GOTO 620610 field=1620RETURN647REM ********************648REM Simulate SPC command649REM ********************650FOR t=1 TO s660? " "; 670NEXT t680RETURN697REM ********************698REM List (2 lines/record)699REM ***********1REM ezfmerge2REM Joe Alford, Dec 19903REM Merge 2 ezfiler files4REM 30 records of 256 bytes each start at 27648 and 353275REM 27647 has number of records left of original 30 for file 1, 35327 for file 2.  Files overlap at 35327 to aid sort.8LOMEM :43009:POKE 16953, 95:REM Space for 2 files.  Must rerun HELLO before using other pgms9DIM nm$(69): tf%=11673:REM name table for sort.  Transfer records routine (set up in HELLO)10GOSUB 100:REM get 4 file names20GOSUB 200:REM load 2 files30GOSUB 300:REM p "; r$(x, 1); 930 s=LEN(r$(x, 1))+LEN(r$(x, 2))940 s=27-s:GOSUB 650950IF x+1>e THEN ?:GOTO 1010960? r$(x+1, 2); " "; r$(x+1, 1); 970 s=LEN(r$(x+1, 1))+LEN(r$(x+1, 2))980 s=27-s:GOSUB 650990IF x+2>e THEN ?:GOTO 10101000? r$(x+2, 2); " "; r$(x+2, 1)1010? r$(x, 4); 1020IF x+1>e THEN ?:GOTO 10801025 s=LEN(r$(x, 4))1030 s=28-s:GOSUB 6501040? r$(x+1, 4); 1050 s=LEN(r$(x+1, 4))1060 s=28-s:GOSUB 6501065IF x+2>e THEN ?:GOTO 10801070? r$(x+2, 4)1080? r$(x, 5); ", "; r$(x, 6); spc(1); r$(x, 7); 1090? "Enter Input File Names"120?:INPUT " File 1:  "; f1$130?:INPUT " File 2:  "; f2$140?:? "Enter Output File Names"150?:INPUT " File 1:  "; f3$: fo$=f3$160?:INPUT " File 2:  "; f4$170RETURN197REM ********************198REM Load 2 Files199REM ********************200TEXT:? " Loading "; f1$210? CHR$(4); " bload "; f1$; " ,A27647"220 c1%=PEEK(35327):REM This character is about to be overlayed.230?:? " Loading "; f2$240? CHR$(4); " bload "; f2$; " ,A35327":REM Now the two files are together for sort30? CHR$(4); " bsave "; f3$; " ,A27647,L7681"540IF c2%=0 THEN ? " No records left for "; f4$:GOTO 580550?:? " Writing "; f4$560 c2%=30-c2%:POKE 35327, c2%570? CHR$(4); " bsave "; f4$; " ,A35327,L7681"580RETURN6000?:? " Sorting Records":?6300 mr%=59:FOR x=0 TO mr%: k9=27648+x*2566310 b$="":FOR y=0 TO 24: a%=PEEK(k9+y):IF a%=3 GOTO 63306315IF a%>=97 AND a%<=122 THEN  a%=a%-32:REM remove caps for sort6320 b$=b$+CHR$(a%):NEXT y6330 nm$(x)=b$:NEXT x:FOR ii=0 TO mr%-1:FOR jj=ii+1 TO mr%6340IF nm$(ii)<x=c3% TO 30340FOR y=0 TO 2350 c=b+256*x+y360POKE c, n%370NEXT y380NEXT x390RETURN397REM ********************398REM Restore "Z" to "3"399REM ********************400 c3%=60-c1%-c2%410IF c3%>59 THEN 460420 b=27648: n%=3430FOR x=c3% TO 60440FOR y=0 TO 2450GOSUB 350:REM next y,x in routine at 350460RETURN497REM ********************498REM Write 2 files499REM ********************500?:? " Writing "; f3$510 c1%=60-c1%-c2%: c2%=0:IF c1%>30 THEN  c2%=c1%-30: c1%=30520 c1%=30-c1%:POKE 27647, c1%547"297REM ********************298REM Write file299REM ********************300?:? "Writing "; f2$310? " Hit any key when ready":? " (ESCAPE to Abort copy)"320GET k$: k%=ASC(k$):IF k%=27 THEN ? "copy Aborted":END330? CHR$(4); " bsave "; f2$; " ,A27647,L7681"340?:? "File Copied"Robert G.411 S. 17th StChestertonIN46304USA926-88823121=nm$(jj) GOTO 64006350 du$=nm$(ii): nm$(ii)=nm$(jj): nm$(jj)=du$:POKE tf%+5, 16360POKE tf%+2, ii+108:POKE tf%+8, 212:CALL tf%6370POKE tf%+2, jj+108:POKE tf%+8, ii+108:CALL tf%6380POKE tf%+2, 212:POKE tf%+8, jj+108:CALL tf%6400NEXT jj:NEXT ii:? " records sorted.":?6410RETURNnext y,x in routine at 350460RETURN497REM ********************498REM Write 2 files499REM ********************500?:? " Writing "; f3$510 c1%=60-c1%-c2%: c2%=0:IF c1%>30 THEN  c2%=c1%-30: c1%=30520 c1%=30-c1%:POKE 27647, c1%5ing250 c2%=PEEK(35327):REM Records Available from file 2260POKE 35327, c1%:REM Restore final character of File 1270 c1%=PEEK(27647):REM Records Available from file 1280RETURN297REM ********************298REM Fix Available Records to sort to end of combined file299REM ********************300 n%=ASC("Z"):IF c1%>0 THEN  b=27648: c3%=30-c1%:GOSUB 330310IF c2%>0 THEN  b=35328: c3%=30-c2%:GOSUB 330320RETURN327REM ********************328REM Change "3" to "Z" for sort329REM ********************330FOR 1REM ezfcopy2REM Joe Alford, Dec 19903REM Copy an ezFILER file10LOMEM :3532897REM ********************98REM Get File Names     99REM ********************100TEXT:? "ezfcopy":?:?110? "Enter file names"120?:? "Input File ":INPUT " "; f1$130?:? "Output File ":? " (RETURN for same)":INPUT " "; f2$140?:? " Input  - "; f1$150IF f2$="" THEN  f2$=f1$160? " Output - "; f2$197REM ********************198REM Load File199REM ********************200?:? "Reading "; f1$210? CHR$(4); " bload "; f1$; " ,A27630? CHR$(4); " bsave "; f3$; " ,A27647,L7681"540IF c2%=0 THEN ? " No records left for "; f4$:GOTO 580550?:? " Writing "; f4$560 c2%=30-c2%:POKE 35327, c2%570? CHR$(4); " bsave "; f4$; " ,A35327,L7681"580RETURN6000?:? " Sorting Records":?6300 mr%=59:FOR x=0 TO mr%: k9=27648+x*2566310 b$="":FOR y=0 TO 24: a%=PEEK(k9+y):IF a%=3 GOTO 63306315IF a%>=97 AND a%<=122 THEN  a%=a%-32:REM remove caps for sort6320 b$=b$+CHR$(a%):NEXT y6330 nm$(x)=b$:NEXT x:FOR ii=0 TO mr%-1:FOR jj=ii+1 TO mr%6340IF nm$(ii)<Â     GROUNDS and SURGE PROTECTORSÂ     A few months back I started having problems with my disk drive. I cleaned the read write head but that didn't help. So I removed the cover and gave it a thorough cleaning and oiling. It worked for about one day, then it really started doing weird things. Once when I tried to save a file it wiped the entire disk clean, even the format. So I packed it up to be sent out for repair.     At this time I was in the process of running a new electrical circuit for the ADAM r since.      There's no way I can prove it, but I believe the disk drive problem  was caused by a power dip when the sump pump kicked on, and the lack of a ground could have compounded the  situation, or even been the cause.     I am now a firm believer in surge protection for all electronic equipment and making sure there is a good ground all the way back to the main electrical box.      If your ADAM does strange things at times this may be something you'll want to check out.                An Adamattitor have the same type electrical cord and I had the monitor,not the disk drive pluged into the protector. I also had made the mistake of using a two wire wall outlet with an adapter. I had the adapter grounded to the wall outlet so I assumed the computer was   grounded. Wrong, the electrical wall box was not grounded, therefore nothing was grounded. I also discovered this electrical circuit supplied power to my sump pump.     So I unpacked the disk drive, hooked it back up, and its been working fine eveHR$(a%):NEXT500DATA check parameters,enter record,scan records,edit record510DATA sort records,delete a record,clear workspace520DATA file options,print workspace,exit program530FOR x=0 TO 9:READ m1$(x):NEXT540DATA SURNAME,FIRST NAME,ORGANIZATION,ADDRESS,CITY550DATA STATE (PROVINCE),ZIP (POSTAL) CODE,COUNTRY560DATA PHONE NUMBER,FIRST ISSUE,TERM (months),ID CODE570FOR x=1 TO 12:READ fd$(x):NEXT580DATA 0,25,25,25,25,25,20,20,20,20,15,15,15590FOR x=0 TO 12:READ mx%(x):NEXT600DATA SmartWRITER,dot mate ADAMite                Jerry Vrancksand I had the monitor,not the disk drive pluged into the protector. I also had made the mistake of using a two wire wall outlet with an adapter. I had the adapter grounded to the wall outlet so I assumed the computer was   grounded. Wrong, the electrical wall box was not grounded, therefore nothing was grounded. I also discovered this electrical circuit supplied power to my sump pump.     So I unpacked the disk drive, hooked it back up, and its been working fine eveand some other electronic equipment.In the meantime I had run an extension cord to a different wall outlet.I only had a three outlet surge protector. To this I had connected the power supply, DM printer ,and I thought the disk power supply. The monitor was just pluged into the wall outlet.     Before I sent the disk drive out for repair I finished the wiring job. When I plugged the computer into the new circuit I discovered the disk drive had not been plugged into the surge protector. The disk drive and mo5POKE 16134, 27:ONERR  GOTO 6000010REM ezFILER20REM written by DIGITAL EXPRESS30REM presented in "Nibbles & Bits"40REM July 198790REM run HELLO program first100 cb%=27407: tc%=27423: mm%=27436: nn%=27465: sd%=27486110 rd%=27595: hd%=27614: mx%=30: hc$="USA": re$=CHR$(13)120DIM fd$(12), mx%(12), mo$(12), nm$(39):CALL hd%130 sp%=11660: tf%=11673: m1$=CHR$(27)+CHR$(69)140 m2$=CHR$(27)+CHR$(70)300 g%=1:FOR x=11685 TO 11770: a%=PEEK(x)310ON g%=4 GOTO 500:IF a%=3 THEN  g%=g%+1:NEXT320 g$(g%)=g$(g%)+Cr since.      There's no way I can prove it, but I believe the disk drive problem  was caused by a power dip when the sump pump kicked on, and the lack of a ground could have compounded the  situation, or even been the cause.     I am now a firm believer in surge protection for all electronic equipment and making sure there is a good ground all the way back to the main electrical box.      If your ADAM does strange things at times this may be something you'll want to check out.                An Adamatrix,EPSON compatible610DATA PANASONIC features,done620FOR x=1 TO 5:READ pt$(x):NEXT630DATA disk one,disk two,tape one,tape two,done640FOR x=1 TO 5:READ dv$(x):NEXT650DATA January,February,March,April,May,June,July,August660DATA September,October,November,December670FOR x=1 TO 12:READ mo$(x):NEXT680DATA change drive,change printer,change date,done690FOR x=1 TO 4:READ pm$(x):NEXT700DATA scan foreward,scan backward,edit record710DATA delete record,print record,done720FOR x=1 TO 6:READ m2$(x):NEXT7%=27 GOTO 1000: a%=VAL(b$)1830IF a%<1 OR a%>12 THEN GOSUB 30300:GOTO 18101840POKE 201, a%:VTAB 3:HTAB 2:? "Enter year:"1850 vt%=3: ht%=15: ll=4:GOSUB 55000:IF a%=27 GOTO 10001860 a%=VAL(b$):IF a%<100 THEN  a%=a%+19001870POKE 203, a%/256:POKE 202, a%-256*PEEK(203):GOTO 11002000HOME:GOSUB 31200:HTAB 3:? "press <return> after typing "2010? " press <escape> to abort entry"2020? " "; :FOR x=1 TO 29:? "-"; :NEXT2030VTAB 20:POKE 16993, 20:POKE 16995, 4:HOME2100 lf$=" ": hf$="z": ml=0: vt%=23: ht%=22105G1040IF k$<"0" OR k$>"9" THEN GOSUB 30300:GOTO 10301050GOSUB 30100:IF k%>5 THEN  k%=k%-5:GOTO 10701060ON k% GOTO 1100, 2000, 3000, 4000, 60001070ON k% GOTO 10000, 11000, 12000, 13000, 560001100HOME:INVERSE:HTAB 2:? " drive:   ":?1110HTAB 2:? " printer: ":?:HTAB 2:? " date:    "1120NORMAL:GOSUB 31600:VTAB 1:HTAB 14:? dv$1130VTAB 3:HTAB 14:? pt$(PEEK(200))1140VTAB 5:HTAB 14:? mo$(PEEK(201)); " "; 1150 yr%=256*PEEK(203)+PEEK(202):? STR$(yr%)1200VTAB 10:FOR x=1 TO 4:? " "; x; " = "; pm$(x):NEXT1210GET010GOSUB 40100:GOSUB 319003020FOR x=1 TO 6:? " "; x; " = "; m2$(x):NEXT3030VTAB 23:HTAB 2:GET k$: k%=VAL(k$)3035IF k%<1 OR k%>6 THEN GOSUB 30300:GOTO 30303040GOSUB 30100:ON k% GOTO 3100, 3110, 3200, 3300, 3400, 10003100 rn%=rn%+1:GOTO 31203110 rn%=rn%-13120 mr%=mx%-PEEK(27647)-13130IF rn%>mr% THEN  rn%=03140IF rn%<0 THEN  rn%=mr%3150GOSUB 31710:GOSUB 40100:GOTO 30303200GOSUB 31900:? " Enter field # to edit:"3210 lf$="0": hf$="9": ml=1: ll=2: vt%=17: ht%=253220GOSUB 55000:IF a%=27 GOTO 32703230 "; dv$(4): dv%=dv%+11360? " "; dv%; " = "; dv$(5)1400GET k$: k%=VAL(k$)1410IF k%<1 OR k%>dv% THEN GOSUB 30300:GOTO 14001420GOSUB 30100:IF k%=dv% GOTO 11001430POKE 16821, PEEK(27640+k%):GOTO 11001600HOME:? " Select a printer:":?1610FOR x=1 TO 5:? " "; x; " = "; pt$(x):NEXT1620GET k$: k%=VAL(k$):IF k%<1 OR k%>5 THEN GOSUB 30300:GOTO 16201630GOSUB 30000:ON k%=5 GOTO 1100:POKE 200, k%:GOTO 11001800HOME:? " Enter month (by number):"1810 lf$="0": hf$="9": ml=1: ll=2: vt%=1: ht%=28:GOSUB 550001820ON a30DATA load file,save file,delete file,rename file,done740FOR x=1 TO 5:READ m3$(x):NEXT750DATA address label,newsletter label,done760FOR x=1 TO 3:READ pa$(x):NEXT780DATA print all labels,print newsletter labels,done790FOR x=1 TO 3:READ pb$(x):NEXT980DATA 27,108,0,27,81,35,27,97,1990FOR x=65520 TO 65528:READ mc:POKE x, mc:NEXT1000TEXT:CALL tc%:POKE 16953, 95:GOSUB 311001010FOR x=0 TO 9:VTAB x+6:? " "; x; " = "; m1$(x):NEXT1020VTAB 17:? " Select option by number: "; 1030GET k$: k%=VAL(k$): k%=k%+1OSUB 31700:VTAB 20:HTAB 2:? "RECORD #: "; rn%+12110FOR x=1 TO 12:VTAB 22:HTAB 2:? "Enter "; fd$(x); ":"2120 ll=mx%(x)-1:GOSUB 55000:IF a%=27 GOTO 10002130IF b$="" AND x=8 THEN  b$=hc$2135IF b$="" GOTO 21602140FOR y=1 TO LEN(b$): a%=ASC(MID$(b$, y, 1))2150POKE k9+mx%(x-1)+y, a%:NEXT y2160 k9=k9+mx%(x-1):?:?:?:?:NEXT x2200 rc%=PEEK(27647):POKE 27647, rc%-1:GOSUB 300002210GOSUB 30100:?:?:?:?2220ON PEEK(27647)=0 GOTO 1000:GOTO 21003000ON PEEK(27647)=mx% GOTO 31800:GOSUB 400003005 rn%=0:GOSUB 317103 k$: k%=VAL(k$):IF k%<1 OR k%>4 THEN GOSUB 30300:GOTO 12101220GOSUB 30000:ON k% GOTO 1300, 1600, 1800, 10001300HOME:? " select a drive option:":?1310CALL sd%: dv%=11320IF PEEK(65532)<>4 GOTO 13301325POKE dv%+27640, 4:? " "; dv%; " = "; dv$(1): dv%=dv%+11330IF PEEK(65533)<>5 GOTO 13401335POKE dv%+27640, 5:? " "; dv%; " = "; dv$(2): dv%=dv%+11340IF PEEK(65534)<>8 GOTO 13501345POKE dv%+27640, 8:? " "; dv%; " = "; dv$(3): dv%=dv%+11350IF PEEK(65535)<>24 GOTO 13601355POKE dv%+27640, 24:? " "; dv%; " = fd%=VAL(b$):IF fd%<1 OR fd%>12 THEN GOSUB 30300:GOTO 32203240HOME:? " Enter new "; fd$(fd%); ":"3250 lf$=" ": hf$="z": ml=0: ll=mx%(fd%)-1: vt%=19: ht%=23260GOSUB 55000:ON a%=27 GOTO 3270:GOSUB 410003270HOME:GOSUB 31710:IF mk%=0 GOTO 30103280 mk%=0:GOTO 10003300GOSUB 41500:GOTO 32703400HOME:? " Which print option?"3410FOR x=1 TO 3:? " "; x; " = "; pa$(x):NEXT3420GET k$: k%=VAL(k$):IF k%<1 OR k%>3 THEN GOSUB 30300:GOTO 34203430GOSUB 30100:ON k% GOTO 3500, 3600, 32703500GOSUB 41700: ms$=" ":GOSUB " press <return> ..."; 12020GET go$:GOSUB 30100:IF go$<>CHR$(13) GOTO 100012100GOSUB 31910:HOME:? " reading "; dv$; " ..."12110POKE rd%+7, 1:CALL rd%:IF PEEK(0)<>128 THEN GOSUB 30300:GOTO 1200012120HOME: fi%=0: st=54324: vt%=0: ht%=212130 st=st+26: vt%=vt%+1:IF PEEK(st+12)=1 GOTO 1220012135IF PEEK(st+12)=4 OR PEEK(st+12)=20 THEN  vt%=vt%-1:GOTO 1213012140POKE sp%+2, st/256:POKE sp%+1, st-256*PEEK(sp%+2)12150IF fi%>14 THEN  ht%=16:VTAB vt%-15:GOTO 1217012160VTAB vt%12170HTAB ht%:CALL sp%:IF fi%>29 %-1 GOTO 320006100HOME:? " Really SORT records?"6110?:? " (Y=yes & N=no): "; 6120GET k$:IF k$="n" OR k$="N" THEN GOSUB 30100:GOTO 10006130IF k$<>"y" AND k$<>"Y" THEN GOSUB 30300:GOTO 61206200GOSUB 30100:HOME:? " SORTing alphabetically ..."6300 mr%=mx%-PEEK(27647)-1:FOR x=0 TO mr%: k9=27648+x*2566310 b$="":FOR y=0 TO 24: a%=PEEK(k9+y):IF a%=3 GOTO 63306315IF a%>=97 AND a%<=122 THEN  a%=a%-326320 b$=b$+CHR$(a%):NEXT y6330 nm$(x)=b$:NEXT x:FOR ii=0 TO mr%-1:FOR jj=ii+1 TO mr%6340IF nm$(ii)<=nm$(jj) , 1)="H" THEN  b$=LEFT$(b$, a%-1)12330HOME:? " getting "; b$; " ..."12340VTAB 23:? CHR$(4); "bload "; b$; ",A27647"12350 cn$=b$:GOSUB 31400:GOSUB 30000:CALL hd%:GOTO 100012400? " Enter new filename:"12410 vt%=21: ht%=2: lf$="!": hf$="z": ml=1: ll=1012420GOSUB 55000:IF a%=27 GOTO 100012430HOME:? " storing "; b$; " ..."12440VTAB 23:? CHR$(4); "bsave "; b$; ",A27647,L7681"12450 cn$=b$:GOSUB 31400:GOSUB 30000:CALL hd%:GOTO 100012500? " DELETE which file:"12510 vt%=21: ht%=2: lf$="!": hf$="z": ml=1: lmr% THEN GOSUB 30300:GOTO 1002010050GOSUB 31710:HOME:GOSUB 40000:GOSUB 4010010060GOSUB 31900:GOSUB 41500:GOTO 100011000HOME:? " Really CLEAR workspace?"11010?:? " (Y=yes & N=no): "; 11020GET k$:IF k$="n" OR k$="N" THEN GOSUB 30100:GOTO 100011030IF k$<>"y" AND k$<>"Y" THEN GOSUB 30300:GOTO 1102011100GOSUB 30100:HOME:? " clearing workspace ..."11110CALL cb%:POKE 27647, mx%: cn$="new file":GOSUB 3140011120HOME:? " workspace cleared!!!":GOTO 3100012000HOME:GOSUB 31600:? " to read "; dv$; ","12010?:? 41800:GOSUB 420003510FOR y=1 TO cq%:GOSUB 43100:NEXT:GOTO 32703600GOSUB 41800:GOSUB 42000:GOSUB 450003610GOSUB 45300:GOSUB 43100:GOTO 32703999END4000ON PEEK(27647)=mx% GOTO 31800: mr%=mx%-PEEK(27647)-14010HOME:? " Enter RECORD # to EDIT:"4020 lf$="0": hf$="9": ml=1: ll=2: vt%=1: ht%=28:GOSUB 550004030ON a%=27 GOTO 1000: rn%=VAL(b$)-14040IF rn%<0 OR rn%>mr% THEN GOSUB 30300:GOTO 40204050GOSUB 31710:HOME:GOSUB 40000:GOSUB 401004060 mk%=1:GOTO 32006000ON PEEK(27647)=mx% GOTO 31800:IF PEEK(27647)=mxGOTO 1220012180 fi%=fi%+1:GOTO 1213012200VTAB 17:HTAB 2:INVERSE:? " current file: ":NORMAL12210VTAB 17:HTAB 20:? cn$:?12220FOR x=1 TO 5:? " "; x; " = "; m3$(x):NEXT12230VTAB 24:HTAB 15:GET k$: k%=VAL(k$)12240IF k%<1 OR k%>5 THEN GOSUB 30300:GOTO 1223012250GOSUB 30100:POKE 16993, 6:POKE 16995, 18:HOME12260ON k% GOTO 12300, 12400, 12500, 12600, 100012300? " Enter the filename to load:"12310 vt%=21: ht%=2: lf$="!": hf$="z": ml=1: ll=1012320GOSUB 55000:IF a%=27 GOTO 100012325 a%=LEN(b$):IF RIGHT$(b$GOTO 64006350 du$=nm$(ii): nm$(ii)=nm$(jj): nm$(jj)=du$:POKE tf%+5, 16360POKE tf%+2, ii+108:POKE tf%+8, 212:CALL tf%6370POKE tf%+2, jj+108:POKE tf%+8, ii+108:CALL tf%6380POKE tf%+2, 212:POKE tf%+8, jj+108:CALL tf%6400NEXT jj:NEXT ii:HOME:? " records sorted."6410GOSUB 30100:GOTO 3100010000ON PEEK(27647)=mx% GOTO 31800: mr%=mx%-PEEK(27647)-110010HOME:? " Enter RECORD # to DELETE:"10020 lf$="0": hf$="9": ml=1: ll=2: vt%=1: ht%=28:GOSUB 5500010030ON a%=27 GOTO 1000: rn%=VAL(b$)-110040IF rn%<0 OR rn%>l=1012520GOSUB 55000:IF a%=27 GOTO 100012525 a%=LEN(b$):IF RIGHT$(b$, 1)="H" THEN  b$=LEFT$(b$, a%-1)12530HOME:? " deleting "; b$; " ..."12540VTAB 23:? CHR$(4); "delete "; b$12550GOSUB 30000:GOTO 1210012600? " RENAME which file:"12610 vt%=20: ht%=2: lf$="!": hf$="z": ml=1: ll=1012612GOSUB 55000:?:ON a%=27 GOTO 100012614 a%=LEN(b$):IF RIGHT$(b$, 1)="H" THEN  b$=LEFT$(b$, a%-1)12616?:? " Enter NEW filename:": ob$=b$12618 vt%=23: ht%=2: lf$="!": hf$="z": ml=1: ll=1012620GOSUB 55000:ON a%=27 GOTO 10k9+1:VTAB 1:HTAB 15:? rn%+1; " "40110FOR x=1 TO 12: k9=k9+mx%(x-1)40120POKE sp%+2, k9/256:POKE sp%+1, k9-256*PEEK(sp%+2)40130VTAB x+2:HTAB 6:CALL sp%:NEXT:POKE 16953, 95:RETURN40200POKE 16953, 32:POKE 16993, 12:POKE 16995, 2:POKE 16996, 540210POKE 16994, 26:VTAB 10:HTAB 10:HOME:POKE 16994, 3140220POKE 16993, 8:POKE 16995, 16:POKE 16996, 1:RETURN41000IF b$="" AND fd%=8 THEN  b$=hc$41010GOSUB 31710:FOR x=1 TO fd%-1: k9=k9+mx%(x-1):NEXT41020IF b$="" THEN  y=1:GOTO 4110041030FOR y=1 TO LEN(b$): a%=ASC:GOSUB 45000:IF ms$="GONE" GOTO 1323013220GOSUB 45300:GOSUB 4310013230NEXT:GOTO 100030000POKE mm%+1, 20:POKE mm%+15, 10:CALL mm%:RETURN30100POKE mm%+1, 8:POKE mm%+15, 25:CALL mm%:RETURN30200POKE mm%+1, 2:POKE mm%+15, 7:CALL mm%:RETURN30300POKE nn%+1, 226:POKE nn%+10, 120:CALL nn%:RETURN30400POKE nn%+1, 228:POKE nn%+10, 20:CALL nn%:RETURN31000?:? " press any key to continue..."; :GET go$31010GOSUB 30000:RUN31100VTAB 1:INVERSE:HTAB 2:? " records free: "31110HTAB 2:? " records used: "31120HTAB 2:? LL tf%41620FOR x=35072 TO 35327:POKE x, 3:NEXT41630POKE 27647, PEEK(27647)+1:RETURN41700HOME:? " How many copies?"41710 vt%=VPOS(0): ht%=20: ml=1: ll=3: lf$="0": hf$="9"41720GOSUB 55000:IF a%=27 THEN POP:GOTO 100041730 cq%=VAL(b$):IF cq%<1 OR cq%>500 THEN GOSUB 30300:GOTO 4172041740RETURN41800HOME:? " press <return> to print ..."; 41810GET go$:IF go$<>re$ THEN POP:GOSUB 30100:GOTO 100041820GOSUB 30000:HOME:? " printing ..."; :RETURN41900IF PEEK(200)>2 THEN  x$=m1$:GOTO 4410041910RETURN41950IF P)=8 THEN  dv$=dv$(3)31630IF PEEK(16821)=24 THEN  dv$=dv$(4)31640RETURN31700 rn%=mx%-PEEK(27647)31710 k9=27647+rn%*256:RETURN31800HOME:? " No RECORDS in workspace!!!":GOSUB 30300:GOTO 3100031900POKE 16993, 8:POKE 16995, 16:VTAB 20:HOME:RETURN31910POKE 16993, 24:POKE 16995, 0:RETURN32000HOME:? " ONLY one RECORD!!!":GOSUB 30300:GOTO 3100040000HOME:HTAB 2:INVERSE:? " RECORD #:"40010FOR x=1 TO 12: x$=STR$(x):IF x<10 THEN  x$=" "+x$40020VTAB x+2:HTAB 2:? x$; ":":NEXT:NORMAL:RETURN40100GOSUB 40200: k9=0012630HOME:? " renaming "; ob$; " ..."12640VTAB 23:? CHR$(4); "rename "; ob$; ","; b$12650GOSUB 30000:GOTO 1210013000HOME:? " Which global printing?":?13010FOR x=1 TO 3:? " "; x; " = "; pb$(x):NEXT13020GET k$: k%=VAL(k$):IF k%<1 OR k%>3 THEN GOSUB 30300:GOTO 1302013030GOSUB 30100:ON k% GOTO 13100, 13200, 100013100 ms$=" ":GOSUB 41800:GOSUB 42000: mr%=mx%-PEEK(27647)-113110FOR y=0 TO mr%: rn%=y:GOSUB 43100:NEXT:GOTO 100013200GOSUB 41800:GOSUB 42000: mr%=mx%-PEEK(27647)-113210FOR y=0 TO mr%: rn%=y(MID$(b$, y, 1))41040POKE k9+mx%(fd%-1)+y, a%:NEXT y41100POKE k9+mx%(fd%-1)+y, 3:RETURN41500HOME:? " Really DELETE record # "; rn%+1; "?"41510?:? " (Y=yes & N=no): "; 41520GET k$:IF k$="n" OR k$="N" THEN GOTO 3010041530IF k$<>"y" AND k$<>"Y" THEN GOSUB 30300:GOTO 4152041540GOSUB 30100:HOME:? " deleting record ...":GOSUB 4160041550HOME:? " record deleted!!":POP:GOTO 3100041600 mr%=mx%-PEEK(27647)-1:POKE tf%+2, 108+rn%+141605IF mx%-rn%-1=0 GOTO 4162041610POKE tf%+5, mx%-rn%-1:POKE tf%+8, rn%+108:CA" file name:    ":NORMAL31130VTAB 1:HTAB 18:? PEEK(27647)31140HTAB 18:? mx%-PEEK(27647)31150GOSUB 31300:HTAB 18:? cn$:RETURN31200IF PEEK(27647)>0 THEN RETURN31210? " workspace full!!!":GOSUB 30300:GOTO 3100031300 cn$="":FOR x=27630 TO 27640: cn%=PEEK(x): b$=CHR$(cn%)31310ON cn%=3 GOTO 31640: cn$=cn$+b$:NEXT31400FOR x=1 TO LEN(cn$): a%=ASC(MID$(cn$, x, 1))31410POKE x+27629, a%:NEXT:POKE 27629+x, 3:RETURN31600IF PEEK(16821)=4 THEN  dv$=dv$(1)31610IF PEEK(16821)=5 THEN  dv$=dv$(2)31620IF PEEK(16821EEK(200)>2 THEN  x$=m2$:GOSUB 4410041960RETURN42000IF PEEK(200)=1 THEN  pj%=1:RETURN42010 pj%=3:IF PEEK(200)<>4 THEN RETURN42020POKE 65522, 0:POKE 65525, 35:FOR x=65520 TO 6552842030POKE 1127, PEEK(x):CALL 1126:NEXT:RETURN43100 x$=ms$:GOSUB 44100: x$=re$:GOSUB 4410043102 k9=27648+rn%*256+50: x%=PEEK(k9)43103IF x%=3 THEN  x$=re$:GOSUB 44100:GOTO 4311043104GOSUB 44000: x$=re$:GOSUB 4410043108GOSUB 41900: x$="ATTN: ":GOSUB 4410043110GOSUB 41900: k9=27648+rn%*256+25:GOSUB 44000: x$=" ":GOSUB 4410043SUB 55170:GOTO 5502055120IF LEN(b$)<ll GOTO 5516055150GOSUB 30300:GOTO 5502055160? a$; :GOSUB 30200: b$=b$+a$:GOTO 5502055170? CHR$(8); CHR$(95); CHR$(8); :RETURN56000TEXT:? " end of program."56010?:? " enter NEW to clear RAM.":END60000CLRERR:POKE 12043, 245:? CHR$(13):PR #0:RUNs$="(expired)":RETURN45220IF tt%<-1 THEN  ms$="GONE":RETURN45230IF tt%=0 THEN  ms$="FINAL ISSUE!!":RETURN45240IF tt%=1 THEN  ms$="TIME TO RENEW":RETURN45250 tt$=STR$(tt%): ms$="("+tt$+" more)":RETURN45300 x$=mf$:GOSUB 444130PR #0:RETURN45000 yv%=PEEK(203)*256+PEEK(202)-1900: xx%=045030 ct%=yv%*12+PEEK(201): yr$="":FOR x=1 TO 445040 a%=PEEK(27647+rn%*256+205+x):IF a%=3 GOTO 4506045050 yr$=yr$+CHR$(a%):NEXT45060IF LEN(yr$)=3 THEN  yr$="0"+yr$45070 mo$=LEFT$(yr$, 2): yr$=RIGHT$(yr$, 2)45080 mo%=VAL(mo$): yr%=VAL(yr$)45100 te$="":FOR x=1 TO 4: a%=PEEK(27647+256*rn%+220+x)45110ON a%=3 GOTO 45120: te$=te$+CHR$(a%):NEXT45120IF LEN(te$)=1 THEN  te$="0"+te$45130IF LEN(te$)=2 THEN  te$="0"+te$45140 t1%=VAL(LEFT$(te$, 1))in the ADAM tradition; and even any    programming language.  We see the venerable little Coleco ADAM computer in it's 8   bit blinding speed go into another year; this one surpassing the 20 year mark from ADAM's birth in 1983.  True, ADAM      doesn't surf the web anymore since the java stuff and the    many pictures it would need to download; but the ADAM is     still the same useful tool for writing letters and notes,    doing graphics and exploring the computer world as a start   to a computer career.100: x$=yf$:GOSUB 4410045310 k9=27648+rn%*256+235:GOSUB 44000: x$="     ":GOTO 4410055000VTAB vt%:HTAB ht%:FOR j=1 TO ll:? CHR$(95); 55010NEXT: b$="":VTAB vt%:HTAB ht%: fe%=FRE(0)55020GET a$: a%=ASC(a$):IF a%=27 GOTO 3000055030IF a%=13 AND LEN(b$)>=ml GOTO 3010055070IF a$>=lf$ AND a$<=hf$ GOTO 5512055080IF a%<>8 AND a%<>163 THEN GOSUB 30300:GOTO 5502055090IF b$="" THEN GOSUB 30300:GOTO 5502055100IF LEN(b$)=1 THEN  b$="":GOSUB 30400:GOSUB 55170:GOTO 5502055110 b$=LEFT$(b$, LEN(b$)-1):GOSUB 30400:GO120 k9=27648+rn%*256:GOSUB 44000: x$=re$:GOSUB 44100:GOSUB 4195043130 k9=27648+rn%*256+75:GOSUB 44000: x$=re$:GOSUB 4410043140 k9=27648+rn%*256+100:GOSUB 44000: x$=", ":GOSUB 4410043150 k9=27648+rn%*256+125:GOSUB 44000: x$="  ":GOSUB 4410043160 k9=27648+rn%*256+145:GOSUB 44000: x$=re$:GOSUB 4410043170 x$=re$:GOTO 4410044000FOR x=0 TO 24: x%=PEEK(k9+x):IF x%=3 GOTO 4413044010 x$=CHR$(x%):GOSUB 44100:NEXT: x$=""44100IF pj%=1 THEN POKE 12043, 20144110PR #pj%:? x$; 44120IF pj%=1 THEN POKE 12043, 2454x	Eerflow at 128.  I just POKEd it to 254 and every-thing is fine.(4)  INSERT and DELETE keys replace ^N and ^O!(5)  ^P works in TEXT40 and TEXT31 (Ben Hinkle's didn't).          JANUARY 2004 ADAM NEWS NETWORK MEDIA+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++This month we have a rerun of some articles from the ANN     archives.   It will be a useful thing to do for some of the  people just beginning : t2%=VAL(MID$(te$, 2, 1))45150 t3%=VAL(RIGHT$(te$, 1)): te%=100*t1%+10*t2%+t3%45160 mt%=mo%+yr%*12+te%: tt%=mt%-ct%-1: mt%=mt%-yv%*12-145170IF mt%>12 THEN  mt%=mt%-12: xx%=xx%+1:GOTO 4517045180 yf$=STR$(yv%+xx%): mf$=STR$(mt%)45190IF mt%<10 THEN  mf$="0"+mf$45200IF tt%=-1 THEN  ms$="(expired)":RETURN45220IF tt%<-1 THEN  ms$="GONE":RETURN45230IF tt%=0 THEN  ms$="FINAL ISSUE!!":RETURN45240IF tt%=1 THEN  ms$="TIME TO RENEW":RETURN45250 tt$=STR$(tt%): ms$="("+tt$+" more)":RETURN45300 x$=mf$:GOSUB 44   ADAM LIVES !!!!!!erflow at 128.  I just POKEd it to 254 and every-thing is fine.(4)  INSERT and DELETE keys replace ^N and ^O!(5)  ^P works in TEXT40 and TEXT31 (Ben Hinkle's didn't).          JANUARY 2004 ADAM NEWS NETWORK MEDIA+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++This month we have a rerun of some articles from the ANN     archives.   It will be a useful thing to do for some of the  people just beginning  (rca)       hookups to plug the ADAM, vcr, game systems, etc into.  AS I mentioned, it is a switch box with signal conversion         properties which allow you to input the ADAM from a monitor  cable with separate sound and video rca plugs and then use a switch to output your signal to a set of speakers and a vga  monitor.  You need the kind that are free standing; in other words, do not rely on an ibm computer to work - they are     available with a 120v adapter so that they can be a free     standing cox	E++++++++++++++++++++++This month we have a rerun of some articles from the ANN     archives.   It will be a useful thing to do for some of the  people just beginning in                ADAM's MONITOR PROBLEM......To say the ADAM is slightly behind the times as far as       quality by hooking it to the tv set, is an understatement.   Very seldom does this result in a great picture without      distortions and/or lines  (rca)       hookups to plug the ADAM, vcr, game systems, etc into.  AS I mentioned, it is a switch box with signal conversion         properties which allow you to input the ADAM from a monitor  cable with separate sound and video rca plugs and then use a switch to output your signal to a set of speakers and a vga  monitor.  You need the kind that are free standing; in other words, do not rely on an ibm computer to work - they are     available with a 120v adapter so that they can be a free     standing coup a       couple on Ebay Auctions for about $15-20 each.  the second   plan is a bit more ambitious.  BAsically it involves a       switching box with intrgrated electronics to convert the     signal to the ibm world.What you need is a vga monitor from an ibm system; and they  are availabe used for next to nothing; and then what is      called a vga convertor.  This little box is made by a        company called Innovations and allows for a pass-thru hookup for the ibm to the monitor, AND also 4 compositein the ADAM tradition; and even any    programming language.  We see the venerable little Coleco ADAM computer in it's 8   bit blinding speed go into another year; this one surpassing the 20 year mark from ADAM's birth in 1983.  True, ADAM      doesn't surf the web anymore since the java stuff and the    many pictures it would need to download; but the ADAM is     still the same useful tool for writing letters and notes,    doing graphics and exploring the computer world as a start   to a computer career.nvertor.  I have purchased 2 of them and they     work great.   They produce a nice crisp picture - better     than the old composite monitors and on a par with the RF     modulator picture.  So, get yourself a VGA BOX or an RF MODULATOR and inprove    that picture from your ADAM !!!!labe used for next to nothing; and then what is      called a vga convertor.  This little box is made by a        company called Innovations and allows for a pass-thru hookup for the ibm to the monitor, AND also 4 compositewandering all over the place.  The answer to this problem was to get a monitor !!!!!  GREAT !!  now just where are we going to find all these composite  monitors in the year 2004 ????   Good question !!!  BUT, we  have other means to accomplish the task of a great picture.  The first plan involoves what is called an RF modulator.     Basically this little electric box refines and sharpens the  picture so that is displays a great picture on the normal    television set.   Cost is minimal - I have picked ööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååöööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööööö