Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1




|Views: 77|Likes:
Published by Moe B. Us

More info:

Published by: Moe B. Us on Apr 03, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





Apple Assembly LineVolume 2 -- Issue 7 April, 1982In This Issue...----------------Adding Auto-SAVE to S-C Macro Assembler . . . . . . . . . 2Review of AED ][ (A new Applesoft Editor) . . . . . . . . 10Ashby's Easy Shift-Key Modifier . . . . . . . . . . . . . 13Potential Trouble in TYMAC . . . . . . . . . . . . . . . . 15Using Macros and Nested Macros . . . . . . . . . . . . . . 17Recursive Macros . . . . . . . . . . . . . . . . . . . . . 22Controlling Software Configuration . . . . . . . . . . . . 24Funny Noise . . . . . . . . . . . . . . . . . . . . . . . 27Another New Book: Bag of Tricks--------------------------------The authors of Beneath Apple DOS (Don Worth and Pieter Lechner)have done it again! This time you get a diskette with fourpowerful disk utilities on it, and a book expaining their use.The retail price is $39.95, but I will have them for only $36.The utilities are TRAX, INIT, ZAP, and FIXCAT. TRAX examines anytrack on a disk, reading it in as pure nibbles and displaying ina partially analyzed form. INIT reformats any track or tracks,optionally retaining existing data in whatever readable sectorsare in the track. You can reorder the sectors, change the volumenumber, and more. ZAP is a general purpose disk utility: sectorsmay be read, written, displayed, modified with a powerfulassortment of over 50 commands. It works with 13- and 16-sectorDOS, as well as Pascal and CP/M diskettes. You can even"program" in ZAP, with labels, loops, and macro-commands. FIXCATcan automatically repair or reconstruct a catalog track byanalyzing the rest of the disk.Beyond the utilities themselves, there is about 40 pages ofadvanced tutorial material which starts where "Beneath Apple DOS"ends.Unless you are fully satisfied with your present collection ofdisk utilities, you ought to get this set.Adding Auto-SAVE to S-C Macro Assembler........Greg H. Anders-------------------------------------------------------------[ Greg is a subscriber from Albuquerque, New Mexico. ]One of the nice features of the new S-C Macro Assembler is thetitle directive (.TI). This directive causes a title and pagenumber to be printed at the top of each page of an assemblylisting. The title directive gave me the idea for the Automatic
Save command program which follows.I felt the need for an Auto Save command because of my owncarelessness. After extensive editing of a rather lengthyprogram, I decided it was a good time to save the program beforeI proceeded. The file names I use are usually descriptive andforgettable, so to save a file, I list the Catalog, then use thecursor controls to copy the file name. After the file nameappeared on the screen, I zipped the cursor next to the name Iwanted to save the file under and, succumbing to temporaryinsanity, typed an "L". The word "LOAD" flashed on the screenand my mouth dropped open in disbelief. The only sounds thatcould be heard were the whirr of the disk drive and the screamsof my new code byting the dust cover!I decided to try to simplify the task of saving a program, givingmyself less chance of making an error. From this came the AutoSave command. With this command, typing SAVE does not save yourprogram on cassette. Instead, the SAVE command searches yoursource program for a title. If a title is found and it is avalid DOS name, the source program is automatically saved, usingthe title as the file name. In addition, if you end your titlewith a version number in the form N.N, Auto Save automaticallyincrements the version number in the source program and saves theprogram using the new version number. The version number optiondoes not erase your old file, which means your old file is aback-up. Be careful, though. A few saves and your disk is fullof back-up files. You'll need to go back and delete a file ortwo every once in a while.The version number goes up to a maximum of 9.9, after which itstarts back at 0.0. If the version number option is not desired,don't put a number in the form N.N at the end of your title.Leading and trailing blanks are ignored by Auto Save. If thereis more than one consecutive blank in a title, the blanks arecompressed to one. Thus, the title ".TI 56,TI TLE"generates a SAVE to the file named "TI TLE". Also, any commas inyour title are changed to dashes so as not to confuse DOS.To use the Auto Save command, the vector address of the SAVEcommand must be changed. The address must be one less than theactual start of the Auto Save command. For example, if Auto Saveis assembled at $800, the address would be changed in the tableinside the S-C Macro Assembler to $07FF.For the version of the S-C Macro Assembler which loads at $1000,change the contents of address $1679 to $07 and $1678 to $FF.Shown as a monitor command, this would be::$1678:FF 07For the Language Card version of the S-C Macro Assembler, changethe content of address $D679 to $07 and $D678 to $FF. You haveto write-enable the card first::$C083 C083 D678:FF 07
I like to keep Auto Save behind the Language Card version of theMacro Assembler. I put the program at $F320 and the changes are::$C083 C083 D678:1F F3One thing you'll have to look out for. If you type an illegalDOS SAVE command such as "SAVE 1 4 THE ROAD", DOS ignores thiscommand and the Auto Save goes into effect; the "1 4 THE ROAD" isignored. Also note that the save is performed on the drive thatis active. Since commas are changed to dashes, there iscurrently no way to specify which drive you want the save to beperformed on. Perhaps you would like to try to implement thisenhancement yourself.After you've installed the Auto Save program, type in thisprogram:1000 * A TEST OF AUTO SAVE1010 .TI 54, TITLE TEST VER. 0.9Then type SAVE, and CATALOG. See how the file was saved? Listthe file and notice the change in line 1010. Voila!For those of you who haven't updated to the Macro Assembler yet, Auto Save can beimplemented with S-C Version 4.0 by using the .US command for the title. Thechanges which are necessary are outlined below.1. The following lines must be deleted: 1490-1540,2090-2150, 2460-2470, 2560-2930.2. The following lines must be added:1210 .US S-C VER. 4.0 AUTO SAVE 1.01600 BNE .2 ...ALWAYS1920 * CHECK THE OP CODE FOR .US2170 BCS TITLE2480 .1 CMP #$803480 OPS .AS /.US/3510 NO.TTL .AS /*** NO TITLE ERRO/3515 .AS -/R/3520 .AS /*** ILLEGAL TITLE FIRST CHARACTE/3525 .AS -/R/3. Change the SAVE vector address. For an origin of $800,that would be:$1271:FF 074. To use the command, put the title you want to use forthe file name like so:.US MY TITLE VER. 1.01000 *--------------------------------1010 * AUTOMATIC SAVE PROGRAM1020 * THIS PROGRAM CHECK'S FOR A TITLE1030 * AND IF ONE IS FOUND, THE CURRENT PROGRAM1040 * IS SAVED UNDER THE TITLE

Activity (3)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
dezlac liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->