home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-12 | 56.3 KB | 1,513 lines |
- ************
- Topic 14 Mon Dec 05, 1994
- P.VACULIN at 07:43 EST
- Sub: Print Text from Internet Sources
-
- This a problem of printing text downloaded or buffered from Internet sources.
- 7 message(s) total.
- ************
- ------------
- Category 5, Topic 14
- Message 1 Mon Dec 05, 1994
- P.VACULIN at 07:47 EST
-
- I have had a problem with text I download or buffer from all sources from the
- Internet. I guess that there are no carriage returns in the text I receive.
- By this I mean that the print-out looks like one continuous 80 column print
- job. Is there some utility for the C=64 that will properly format this text so
- it is in a readable form? If so, please let me know. I very much need the
- info so that I can have presentable documents for me and my work.
- << Patrick >>
- ------------
- Category 5, Topic 14
- Message 2 Mon Dec 05, 1994
- THE.OUTLAW at 18:17 EST
-
- If you terminal program doesn't format text properly, you may have to use a
- Word Processor like TWS (The Write Stuff) to fix it.
- ------------
- Category 5, Topic 14
- Message 3 Mon Dec 05, 1994
- C128.JBEE at 23:17 EST
-
- Velvetta64 might do the trick, I believe what you need to add is linefeeds.
- ------------
- Category 5, Topic 14
- Message 4 Wed Dec 07, 1994
- P.VACULIN at 00:38 EST
-
- I wonder....is there possibly a program on the UNIX host that could do this
- (add linefeeds). If so, it might be much faster and possibly even automatic.
- BTW thanks to all of you who responded!!!! The reason I want to add the
- linefeeds automatically is that I frequently get e-mails regarding work that
- are in excess of 100 blocks. This is a lot of text to have to edit:>
- ------------
- Category 5, Topic 14
- Message 5 Wed Dec 07, 1994
- H.HERMAN1 at 02:28 EST
-
- huh?
-
- I don't understand this....
-
- I thought UNIX uses LF's.
-
- Howie
- ------------
- Category 5, Topic 14
- Message 6 Wed Dec 07, 1994
- BEN.GELAMP [Ben] at 17:59 EST
-
- I'm not certain, myself. I just took a cursory look at a FAQ from the
- Internet, and its line terminators do indeed appear to be LF's.
-
- In any event, the fix isn't difficult, and all Commodore people have at
- their disposal the means to apply it: "real" programmers might laugh at
- Commodore BASIC, but I *still* claim it's a nicely capable language.
-
- Perhaps someone would be kind enough to translate the following program into
- Commodore BASIC? I'm very much afraid with the Commodore's keyboard in such
- sad shape, I can't try the code that's in my head :( The program, as is, works
- very nicely on the IBM.
-
- The advantage of doing it in BASIC is that it's so EASY to change if needed.
-
- 100 INPUT "Translate what file "; i$
- 110 INPUT "To what file "; o$
- 120 :
- 130 OPEN i$ FOR INPUT AS #1 ' rem open 1,8,3,i$+",s,r"
- 140 OPEN o$ FOR OUTPUT AS #2 ' rem open 2,8,4,o$+",s,w"
- 150 :
- 160 IF EOF(1) THEN 220 ' something involving ST
- 170 a$ = INPUT$(1, 1) ' get #1, a$
- 180 v = ASC(a$) ' v=asc(a$+chr$(0))
- 190 IF v = 10 THEN PRINT #2, CHR$(13); : GOTO 160
- 200 PRINT #2, a$; : GOTO 160
- 210 :
- 220 CLOSE 2
- 230 CLOSE 1
- 240 PRINT "Done."
-
- ------------
- Category 5, Topic 14
- Message 7 Tue Dec 27, 1994
- B.KURSON [Zotar] at 14:10 EST
-
- One option is if you can try a straight ascii download instead of using kermit
- or z-modem, etc... kermit or another protacol. Another thing you can do is D/L
- the program ACE from the library ghere. It has a conversion utility. Also set
- file type to binary if FTP'ing even tho it is a text file. Hope this helps,
- Zotar
- ------------
- ************
- Topic 15 Sun Jul 17, 1994
- D.TUOMI [Doctor] (Forwarded)
- Sub: Several Questions on Programming
-
- I'm working on a menu program and have several programming questions.
-
- Doc.
- 21 message(s) total.
- ************
- ------------
- Category 5, Topic 15
- Message 1 Sun Jul 17, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- Okay, here is the details on my menu program. It's designed to be the
- menu for my user group's disk of the month. The current version's
- features are as follows:
-
- - Able to operate in either 64 or 128 mode
- - Operates in either 40 or 80 colummn mode on the 128
- - If menu is loaded in 128 mode, it will automatically load 64 software
- and switch mode of operation and run
- - Displays and Prints text files
-
- This is what version 1.14 is able to do. I'm about to begin work on
- version 2.0 of the software, but I have some questions which are stumping
- me that I'd like to ask. Rather than overwhelm with questions, I'll ask
- one. Wait for a hopeful reply or an acknowledgement that no one knows,
- then I'll move on. If the program is successful, perhaps you'll see a
- PD version of it.
-
- First question. I currently have the program where it will run in either
- 40 or 80 column mode on the 128. The menu program can tell by the index
- file it loads whether the selected program to load is supposed to run in
- either 40 or 80 column mode and the program will instruct the person to
- switch the monitor accordingly. Is there anyway of telling if a user
- has a 16k VDC or a 64k VDC? That way if a program REQUIRES 64k VDC, I
- could tell an unupgraded flat 128 owner that he cannot run the program
- selected. Any ideas?
-
- Doc.
- ------------
- Category 5, Topic 15
- Message 2 Sun Jul 17, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Doc:
- DT> Is there anyway of telling if a user has a 16k VDC or a 64k
- DT> VDC
-
- There may be. I don't know for sure, but if I were trying to do it, I
- think what I would do would be to write a character to an address in
- the second 16K, 16384 for example, and see if it appeared on the screen.
- That means a simple poke/peek using the routines at $cdcc/$cdda to
- do that. Actually, it would only take a poke cuz if the character showed
- up it would suggest to me that the VDC is only 16K. You *might* need to
- twiddle bit 4 of register 24 in the VDC to do this tho. It is supposed
- to be 1 for 16K, but that is something done by software. You may have to
- do it tho to make sure your poke works correctly if there *is* 64K vdc
- installed.
-
- Try it like this:
-
- 10 sys dec("cdcc"),64,18:rem set for address 16384
- 20 sys dec("cdcc"),0,19
- 30 sys dec("cdcc"),65:rem poke the letter 'a' into memory there
- 35 :
- 40 sys dec("cdcc"),0,18:rem now set for address 0
- 45 sys dec("cdcc"),0,19
- 50 sys dec("cdd8"):rreg a
- 60 if a=65 then <16K VDC chip>
-
- Line 60 will be your decision line. I can't guarantee this will work.
- It did on my 128 w/16K VDC. What it does is poke the letter into 16384,
- which doesn't exist, then read 0, and see if that character is in there.
- Let me know if it works. If so, this is a nice q&d routine to do what
- you want. The only down side is that it will put an 'a' in the upper
- left corner of your 80 col screen if in that mode. Another way to do it
- would be to try another address in the 2nd 16K that corresponded with
- the zero bytes of padding between characters.... totally transparent to
- the user that way.... just a little more figuring for the addresses, but
- no real change in the routine other than that.
- ------------
- Category 5, Topic 15
- Message 3 Sun Jul 17, 1994
- H.HERMAN1 (Forwarded)
-
- Doc,
-
- This is the way Lou Wallace did it:
-
- 20010 poke 23013,0:poke23026,0
- 20020 @walrus,1:@color,0,0,0:@clear,0,0,0
- 20030 scrdef,1,0,0,640,400,16000,0:@screen,1,0:@clear,255,0,0
- 20040 @screen,0
- 20050 vr=0:tq=@pixel,0,0,0:if tq=0 then vr=1
- 20060 poke23013,134:poke23026,134
- 20070 return
-
- It would be exceedingly helpful, however, before you run the above
- subroutine, if you've booted BASIC 8. :)
-
- Howie
- ------------
- Category 5, Topic 15
- Message 4 Sun Jul 17, 1994
- H.HERMAN1 (Forwarded)
-
- Doc,
-
- Thinking about it, a B8 RTL module should do it.
-
- Howie
- ------------
- Category 5, Topic 15
- Message 5 Sun Jul 17, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- Thanks Mr. Bell, I'll try your routine and see what it does. Difficult getting
- around on the VDC, there doesn't seem to be any central location for
- information on this chip. It's kind of scattered from the Programmer's
- Reference Guide, 128 Internals, etc. Wish I had a Mapping the 128, probably
- some useful stuff in there too. Anyone have a copy they want to sell? Are
- there any other books which have this sort of technical data in it?
-
- Howie, I appreciate the info, but my program is written to run stand alone.
- BASIC-8, while a nice language, produces copyright problems as well as
- compatibilty problems with my routine to swtich to 64 mode to run a program.
- Thanks for the info though, might need it in the future.
-
- Anyone have any other ideas?
-
- Doc.
- ------------
- Category 5, Topic 15
- Message 6 Mon Jul 18, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- You do need to get Mapping the 128.... good luck! Them that has it
- keeps it! It has an excellent coverage of the VDC registers. However
- the routines I posted for you may be what you need.
- ------------
- Category 5, Topic 15
- Message 7 Mon Jul 18, 1994
- H.HERMAN1 (Forwarded)
-
- Doc,
-
- The BASIC 8 package includes a RunTime Library (RTL), which allows any user to
- create his/her own stand-alone BASIC 8 programs. Any programs created with
- the RTL can be distributed however the programmer wants, including
- commercially.
-
- I _think_ that IPAINT and IPORT might be examples of this. Not sure. Perhaps
- someone might know?
-
- More to the point, however, for your purpose you would need to first determine
- that the user has a 128, then you could call in a RTL module to read the vdc,
- based on the earlier post.
-
- I am pretty sure that Ed's suggestion is the way to go. However, I did want
- to point out an alternative, even if it is a bit more, abstract.
-
- Howie
- ------------
- Category 5, Topic 15
- Message 8 Tue Jul 19, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- I don't actually own a copy of BASIC-8. Nor do I know where to get one. It
- seems to be out of print.
-
- Bell, I'm having problems with your routine. On both my 128's the value
- returned is a 32. This isn't the value expected, and one 128 has a 64k and
- the other has a 16k, so there should be some difference. Have you tested this
- routine yourself? If so, then I'll go back check it again, might of missed
- something myself.
-
- Doc.
- ------------
- Category 5, Topic 15
- Message 9 Tue Jul 19, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Doc:
- I looked at the stuff I sent you and there is at least 1 error in it.
- Try this....
-
- 10 bank 15
- 20 sys dec("cdda"),,28:rreg a
- 30 a=a or 16:sys dec("cdcc"),a,28:sys 65378
- 35 :
- 40 sys dec("cdcc"),64,18
- 45 sys dec("cdcc"),0,19
- 50 sys dec("cdca"),65
- 55 :
- 60 sys dec("cdcc"),0,18
- 65 sys dec("cdcc"),0,19
- 70 sys dec("cdd8"):rreg b
- 75 sys dec("cdcc"),a and 239,28:sys 65378
- 80 :
- 85 if b <> 65 then <128 has 64K VDC>
-
- You must make SURE that when you run this the first position in the 80
- column screen does not contain a lower case 'a'. I can't test this
- for you, but I'm reasonably sure it will work. If you want a blow-by-blow:
-
- Line 10 makes sure all SYS calls are into the screen editor routines
- Lines 20 and 30 set the machine for 64K VDC and resets the character set.
- Lines 40 thru 50 poke a lower case 'a' into address 16384, one byte above
- the standard 16K chip RAM.
- Lines 60 thru 70 peek address 0 to see if it contains that lower case 'a'
- If it does, the assumption is that address 16384=0 in the 16K VDC
- Line 75 restores bit 4 of register 28 to 'off' and again calls the
- character set installation routine
- Line 85 tests to see which size RAM is installed.
- if 'a' is in address 0 it is assumed that you have a 16K VDC.
-
- Hope that all makes sense. Sorry for the error in my earlier post.
- On the upside the program is small. Incidentally, this should work fine
- in either 40 or 80 column mode. Let me know if this one does the trick.
- egb
- ------------
- Category 5, Topic 15
- Message 10 Wed Jul 20, 1994
- THE.OUTLAW (Forwarded)
-
- Doc, I just came across exactly what your looking for.... Fred Bowen wrote a
- utility to do what you ask. ------------------------------------------ 1 REM
- FRED'S NIFTY PROGRAM TO DETERMIN SIZE OF 8563 DRAM 10 BANK 15: AD=DEC("D600"):
- DA=AD+1: GOSUB 900 :REM SETUP ML 20 POKEAD,28: S=PEEK(DA):
- POKEDA,63 :REM SELECT 64K 30 I=16896:
- SYSW,I/256,18:SYSW,IAND255,19SYSW,85,31 :REM WRITE $55 40 I=16896:
- SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC1 :REM READ HERE 50 I=17152:
- SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC2 :REM AND HERE 60 I=16896:
- SYSW,I/256,18:SYSW,IAND255,19:SYSW,170,31 :REM WRITE $AA 70 I=16896:
- SYSW,I/266,18:SYSW,IAND255,19:SYSR,,31:RREGC3 :REM READ HERE 80 I=17152:
- SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC4 :REM AND HERE 90 POKEAD,28:
- POKEDA,S: SYSDEC("FF62") :REM RESTORE 16/64K 100 IF C1=C2
- AND C3=C$ THEn PRINT "16K": ELSE PRINT "64K" :REM DID IT ECHO? 110 END 900
- FORI=0TO13: READA$: POKEDEC("180")+DEC(A$): NEXT 910 R=DEC("1800"): DATA
- 8E,00,D6,AD,01,D6,60 :LDA $D601: RTS 920 W=DEC("1807"): DATA
- 8E,00,D6,8D,01,D6,60 :STA $D601: RTS 930 RETURN
- ------------
- Category 5, Topic 15
- Message 11 Wed Jul 20, 1994
- THE.OUTLAW (Forwarded)
-
- Sorry about that.. I straightened it out... 1 REM FRED'S NIFTY PROGRAM TO
- DETERMIN SIZE OF 8563 DRAM 10 BANK 15: AD=DEC("D600"): DA=AD+1: GOSUB 900
- :REM SETUP ML 20 POKEAD,28: S=PEEK(DA): POKEDA,63 :REM
- SELECT 64K 30 I=16896: SYSW,I/256,18:SYSW,IAND255,19SYSW,85,31 :REM
- WRITE $55 40 I=16896: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC1 :REM READ
- HERE 50 I=17152: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC2 :REM AND HERE
- 60 I=16896: SYSW,I/256,18:SYSW,IAND255,19:SYSW,170,31 :REM WRITE $AA 70
- I=16896: SYSW,I/266,18:SYSW,IAND255,19:SYSR,,31:RREGC3 :REM READ HERE 80
- I=17152: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC4 :REM AND HERE 90
- POKEAD,28: POKEDA,S: SYSDEC("FF62") :REM RESTORE 16/64K 100
- IF C1=C2 AND C3=C$ THEn PRINT "16K": ELSE PRINT "64K" :REM DID IT ECHO? 110
- END 900 FORI=0TO13: READA$: POKEDEC("1800")+DEC(A$): NEXT 910 R=DEC("1800"):
- DATA 8E,00,D6,AD,01,D6,60 :LDA $D601: RTS 920 W=DEC("1807"): DATA
- 8E,00,D6,8D,01,D6,60 :STA $D601: RTS 930 RETURN
- ------------
- Category 5, Topic 15
- Message 12 Wed Jul 20, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- Well, Mr. Bell, I was unable to get your version of the program operational.
- Once again no matter what I do it comes back with the same value, in this case
- a "32."
-
- After much decyphering I did have more luck with Outlaw's routine. It
- actually worked perfectly on my flat 128, and my 128d. It successfully was
- able to tell the difference between the two. Does anyone have an upgraded
- flat 128 that we could try this program on? It wouldn't be of much help if
- the routine only worked on 128d's and 16k flat 128's and not on upgraded 64k
- flat 128's.
-
- Doc.
- ------------
- Category 5, Topic 15
- Message 13 Thu Jul 21, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Well, I can't speak for the 64K VDC, but the 16K VDC of my 128 returns
- the 65. I have the chips now and will have to install them and give that
- a try. But if Fred Bowen's routine works, I'd suggest you go with that.
- I can't imagine why it would not work on an upgraded VDC, tho CAM's posts
- were unreadable for me. (*sn Cam.... keep repeating *sn)
- ------------
- Category 5, Topic 15
- Message 14 Thu Jul 21, 1994
- H.HERMAN1 (Forwarded)
-
- Ed,
-
- Ah, good! They arrived!!!
-
- >..... tho CAM's posts
- > were unreadable for me. (*sn Cam.... keep repeating *sn)
-
- Thank goodness....
-
- I was about to return my new glasses to the optician.....
-
- Howie
- ------------
- Category 5, Topic 15
- Message 15 Thu Jul 21, 1994
- THE.OUTLAW (Forwarded)
-
- That'll teach me to do things late at nite! At least the 2nd time it was
- readable! :>
- ------------
- Category 5, Topic 15
- Message 16 Thu Jul 21, 1994
- THE.OUTLAW (Forwarded)
-
- Uh Ed? I think you misplaced this post. Should be cat 3 top 18? Glad I'm not
- the only one who makes mistakes! <g> ;>
- ------------
- Category 5, Topic 15
- Message 17 Thu Jul 21, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- I'm not sure why it doesn't work. I read once in the C128 Internals book
- though that BASIC is too slow for most VDC operations and that their programs
- written in BASIC didn't operate reliably. Perhaps that's the cause. The
- Outlaw's routine worked fine, although it took a bit of work to figure it out.
- I actually rewrote the routine posted, bcause it was a little "over-
- engineered" for my tastes. I got it down to about a quarter of its original
- size and it still works the same.
-
- Doc.
- ------------
- Category 5, Topic 15
- Message 18 Fri Jul 22, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Here is the program The.Outlaw posted from Fred Bowen. :)
-
-
-
- 1 REM FRED'S NIFTY PROGRAM TO DETERMIN SIZE OF 8563 DRAM
- 10 BANK 15: AD=DEC("D600"): DA=AD+1: GOSUB 900 :REM SETUP ML
- 20 POKEAD,28: S=PEEK(DA): POKEDA,63 :REM SELECT 64K
- 30 I=16896: SYSW,I/256,18:SYSW,IAND255,19SYSW,85,31 :REM WRITE $55
- 40 I=16896: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC1 :REM READ HERE
- 50 I=17152: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC2 :REM AND HERE
- 60 I=16896: SYSW,I/256,18:SYSW,IAND255,19:SYSW,170,31 :REM WRITE $AA
- 70 I=16896: SYSW,I/266,18:SYSW,IAND255,19:SYSR,,31:RREGC3 :REM READ HERE
- 80 I=17152: SYSW,I/256,18:SYSW,IAND255,19:SYSR,,31:RREGC4 :REM AND HERE
- 90 POKEAD,28: POKEDA,S: SYSDEC("FF62") :REM RESTORE 16/64K
-
- 100 IF C1=C2 AND C3=C$ THEn PRINT "16K": ELSE PRINT "64K" :REM DID IT ECHO?
- 110 END
- 900 FORI=0TO13: READA$: POKEDEC("1800")+DEC(A$): NEXT
- 910 R=DEC("1800"):DATA 8E,00,D6,AD,01,D6,60 :LDA $D601: RTS
- 920 W=DEC("1807"): DATA 8E,00,D6,8D,01,D6,60 :STA $D601: RTS
- 930 RETURN
-
- [Reformatted w/RTCM 2.04 Editor Overlay]:)
- ------------
- Category 5, Topic 15
- Message 19 Fri Jul 22, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Incidentally, I just noticed a but in the prog from Fred, tho it
- was probably just mistyped when posted. In line 100, C$ should be
- C4... someone was just holding the shift key when they hit the 4. :)
- ------------
- Category 5, Topic 15
- Message 20 Fri Jul 22, 1994
- THE.OUTLAW (Forwarded)
-
- Your Right Ed! Thanks for RE-Redoing the post! I was about to try it a 3rd
- time and see if I could avoid screwing it up again! :>
- ------------
- Category 5, Topic 15
- Message 21 Sat Jul 23, 1994
- D.TUOMI [Doctor] (Forwarded)
-
- I got it going, but I'm curious. This program basically makes the check twice
- with two different values. Is there a reason for this redundancy?
-
- Doc.
- ------------
- ************
- Topic 16 Sun Jul 24, 1994
- CBM-ED [e.g.bell] (Forwarded)
- Sub: Printer Questions
-
- I have run into a problem that my manuals do not cover. Can someone help
- me program my printer. (A printer Programmer's forum)
- 5 message(s) total.
- ************
- ------------
- Category 5, Topic 16
- Message 1 Sun Jul 24, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- This seems to be an uncovered topic, and I have a need that I can't find
- the answer to in my printer manual. I am hoping someone may be able to
- provide a solution.
-
- In GWBASIC on IBM machines, there is a command called WIDTH which is used
- to set the width of printout. What are the escapes this command sends to
- the printer. I'm having a problem with my printouts in transparent mode
- doing line feeds at column 80. I know that the WIDTH command fixes this
- when I do IBM BASIC stuff. Just can't find the right codes to send in
- Commodore BASIC. Thanks!
- ------------
- Category 5, Topic 16
- Message 2 Mon Jul 25, 1994
- H.HERMAN1 (Forwarded)
-
- Ed,
-
- I do not know exactly what WIDTH sends. However, the following should
- work, with Epson emulating printers:
-
- print#1,chr$(27)+chr$(81)+255
-
- If the above does not work, try this variation:
-
- print#1,chr$(27)+chr$(81)+"255"
-
- One or the other will define an Epson printer's right margin to 255.
- Therefore, _only_ after every 255 characters the printer will insert a CR,
- or CR/LF, depending upon how you set things up.
-
- If this doesn't do it, let me know, and I'll hunt through some manuals
- for more ideas.
-
- Howie
- (who has not tested this, so can offer
- no gaurantees that it will work......)
- ------------
- Category 5, Topic 16
- Message 3 Mon Jul 25, 1994
- H.HERMAN1 (Forwarded)
-
- Oooopsss...
-
- Assuming those lines do it, be sure to add a semi-colon:
-
- print#1,chr$(27)+chr$(81)+255;
-
- or:
-
- print#1,chr$(27)+chr$(81)+"255";
-
- Howie
- ------------
- Category 5, Topic 16
- Message 4 Mon Jul 25, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- Howie: I had already tried those commands unsuccessfully. Thanks for
- the input tho. There is still a happy ending to this story though.
- The problem was my stupidity. I thought I was setting my interface into
- transparent mode, but I inadvertently set it for 1525 mode. All the
- dips go one way for that mode, the other for transparent... thus I was
- doomed to 80 cols at that setting no matter what. The upside is that I
- found and fixed the situation and all is working well now. duhhhhhh!
- ------------
- Category 5, Topic 16
- Message 5 Tue Jul 26, 1994
- H.HERMAN1 (Forwarded)
-
- Ed,
-
- I am happy to hear you have the prob solved. It is strange how, at times, we
- can get so involved with the nitty-gritty details, that it is easy to forget a
- basic, like a correct interface setting...
-
- Howie
- ------------
- ************
- Topic 17 Fri Aug 12, 1994
- D.HARKER1 [Dan] (Forwarded)
- Sub: PETASCII printer codes
-
- Help needed with the differences between PETASCII and ASCII
- 1 message(s) total.
- ************
- ------------
- Category 5, Topic 17
- Message 1 Fri Aug 12, 1994
- D.HARKER1 [Dan] (Forwarded)
-
- I need some help with the PETASCII printer codes for a program I'm working
- on. I need to know if the PETASCII codes (dec)0 - (dec)31 are the same as
- in standard ASCII. I especially need to know the ones for paper movement
- (formfed, vertical tab, etc.). Can someone who has a manual for a Commodore
- printer help me and/or upload the codes?
-
- On another question (sorry, don't know where else to ask this), is there a
- 'standard' number of lines to a printed page on a printer? If so, what is the
- number?
-
- Thanks in advance for any help anyone can give.
-
- Dan
-
-
- ------------
- ************
- Topic 18 Fri Feb 10, 1995
- D.BELTER (Forwarded)
- Sub: Basic to ML and Back again...
-
- Just some routines that will you program in ML and Basic!
- 4 message(s) total.
- ************
- ------------
- Category 5, Topic 18
- Message 1 Fri Feb 10, 1995
- D.BELTER (Forwarded)
-
- I thought the following would be helpful for anyone who programs on the C64 in
- ML and Basic. Some will let you SEND NNumbers or Text to ML and also RECIEVE
- text from ML. One last thing, I couldn't figure out how to save the TEXT to
- a Basic area of memory, so it would be good if you did if you did a
- C$=MID(C$,1) which will move C$ from beyond $C000 to normal basic memory. If
- someone has an SYS (JSR) that would do this please tell me since I could never
- get it to work.
-
- print"1. asm":print"2. run":inputa:ifa=1then1070
- z$=chr(0):a=2000:b=125:a$="var. test"+z$:b$="ptrget test":q$=chr(34)
- printq$;:sys49152+3,b$,c$:c=len(c$):c$=mid(c$,1)
- printq$:printc$,c,len(c$):gosub1061 sys49152,a$,a,a+a,a+a+a,a+a+a+a,b+b,b
- print sys49152,"i read this"+z$,1000,-3000,5000,7000,125,255 end sys45195c$
- vp=peek(780)+peek(782)*256:printvp;peek(vp+1)+peek(vp+2)*256:return sys 999
- .org 49152 .mem
-
- ;******* c o n s t a n t s *******
-
- ; < - lo ; > - hi
-
- chrget =$0073 ;get comma chkcom =$aeff ;get comma frmevl =$ad9e strout
- =$ab1e ;a-lo,y-hi ptrget =$b08b ;a-lo,y-hi conint =$b1aa ;y-lo,a-hi len
- =$b77c frestr =$b6a3 ;a-len,x-lo,y-hi comp'len =$b3a2 getbyt =$b79b ;x-lo
- getnum =$b7eb ;get 16 and 8 bit getadr =$b7f7 ;y-lo,a-hi linprt =$bdcd
- ;print a-hi,x-lo getinx =$e200 ;same as - getbyt chkcmm =$e20e ;same as -
- chkcom chrout =$ffd2 movstr =46728 ;a-len;x-lo;y-hi
-
- ;******* v a r i a b l e s *******
-
- linnum =$14 index =$22 datlin =$64 var =$fb pointer =$fd length
- =$02
-
- ;******* start of program ******
-
- : jmp big
-
- ;ptrget ascii test
-
- : jsr chrget : jsr ptrget : sta index : sty index+1 : ldy
- #00 : lda (index),y : sta length : iny : lda (index),y :
- sta pointer : iny : lda (index),y : sta pointer+1 : ldy #00 -
- lda (pointer),y : jsr chrout : iny : cpy length : bne - :
- jmp send'var
-
- ;*** get asc text
-
- big = *
-
- : jsr chrget : jsr frmevl : jsr frestr : sta length : lda
- index ;lo : ldy index+1 ;hi : jsr strout : jsr space
-
- ;*** get two bytes ;positives
-
- : jsr chkcmm : jsr frmevl : jsr getadr ;y-lo a-hi : ldx
- linnum ;x-lo : lda linnum+1 ;a-hi : jsr linprt : jsr space
-
- ;*** get two bytes ;negatives
-
- : jsr chkcom : jsr frmevl : jsr conint ;y-lo ; a-hi : lda
- datlin ;hi than lo byte : ldx datlin+1 : jsr linprt : jsr space
-
- ;*** get two bytes ;positives
-
- : jsr chkcom : jsr frmevl : jsr getadr ;y-lo a-hi : ldx
- linnum ;or linnum : lda linnum+1 : jsr linprt : jsr space
-
- ;*** get two bytes than one byte
-
- : jsr chkcom : jsr getnum : stx var : ldx linnum : lda
- linnum+1 : jsr linprt : jsr space : lda #00 : ldx var :
- jsr linprt : jsr space
-
- ;*** get one byte
-
- : jsr getinx : lda #00 : jsr linprt : rts
-
- space lda "," : jmp chrout : jsr linprt
-
- send'var = *
-
- : jsr chrget : jsr ptrget : sta index : sty index+1 : ldy
- #00 : lda #estore-store : sta (index),y : iny : lda <store :
- sta (index),y : iny : lda >store : sta (index),y : rts
-
- store = * : .asc "send this stuff" estore = *
-
- ------------
- Category 5, Topic 18
- Message 2 Fri Feb 10, 1995
- E.GBELL [e.g.bell] (Forwarded)
-
- Dave: could you resend this message, but save it with '*sn' so that
- the format does not get trashed. :) I love source code of any size,
- but this would be a bit of work getting into a format I could understand
- and work with easily. Thanks!
- ------------
- Category 5, Topic 18
- Message 3 Fri Feb 10, 1995
- C128.JBEE (Forwarded)
-
- You need to use *sn when sending formatted text to GEnie :)
- ------------
- Category 5, Topic 18
- Message 4 Wed Feb 22, 1995
- D.BELTER (Forwarded)
-
- Ok lets try this again, that was strange since all it was formatted with
- was spaces, never had a problem before and it looked ok before I saved it.
-
- So here it again...
-
- print"1. asm":print"2. run":inputa:ifa=1then1070
- z$=chr(0):a=2000:b=125:a$="var. test"+z$:b$="ptrget test":q$=chr(34)
- printq$;:sys49152+3,b$,c$:c=len(c$):c$=mid(c$,1)
- printq$:printc$,c,len(c$):gosub1061
- sys49152,a$,a,a+a,a+a+a,a+a+a+a,b+b,b
- print
- sys49152,"i read this"+z$,1000,-3000,5000,7000,125,255
- end
- sys45195c$
- vp=peek(780)+peek(782)*256:printvp;peek(vp+1)+peek(vp+2)*256:return
- sys 999
- .org 49152
- .mem
-
- ;******* c o n s t a n t s *******
-
- ; < - lo ; > - hi
-
- chrget =$0073 ;get comma
- chkcom =$aeff ;get comma
- frmevl =$ad9e
- strout =$ab1e ;a-lo,y-hi
- ptrget =$b08b ;a-lo,y-hi
- conint =$b1aa ;y-lo,a-hi
- len =$b77c
- frestr =$b6a3 ;a-len,x-lo,y-hi
- comp'len =$b3a2
- getbyt =$b79b ;x-lo
- getnum =$b7eb ;get 16 and 8 bit
- getadr =$b7f7 ;y-lo,a-hi
- linprt =$bdcd ;print a-hi,x-lo
- getinx =$e200 ;same as - getbyt
- chkcmm =$e20e ;same as - chkcom
- chrout =$ffd2
- movstr =46728 ;a-len;x-lo;y-hi
-
- ;******* v a r i a bl e s *******
-
- linnum =$14
- index =$22
- datlin =$64
- var =$fb
- pointer =$fd
- length =$02
-
- ;******* start of program ******
-
- : jmp big
-
- ;ptrget ascii test
-
- : jsr chrget
- : jsr ptrget
- : sta index
- : sty index+1
- : ldy #00
- : lda (index),y
- : sta length
- : iny
- : lda (index),y
- : sta pointer
- : iny
- : lda (index),y
- : sta pointer+1
- : ldy #00
- - lda (pointer),y
- : jsr chrout
- : iny
- : cpy length
- : bne -
- : jmp send'var
-
- ;*** get asc text
-
- big = *
-
- : jsr chrget
- : jsr frmevl
- : jsr frestr
- : sta length
- : lda index ;lo
- : ldy index+1 ;hi
- : jsr strout
- : jsr space
-
- ;*** get two bytes ;positives
-
- : jsr chkcmm
- : jsr frmevl
- : jsr getadr ;y-lo a-hi
- : ldx linnum ;x-lo
- : lda linnum+1 ;a-hi
- : jsr linprt
- : jsr space
-
- ;*** get two bytes ;negatives
-
- : jsr chkcom
- : jsr frmevl
- : jsr conint ;y-lo ; a-hi
- : lda datlin ;hi than lo byte
- : ldx datlin+1
- : jsr linprt
- : jsr space
-
- ;*** get two bytes ;positives
-
- : jsr chkcom
- : jsr frmevl
- : jsr getadr ;y-lo a-hi
- : ldx linnum ;or linnum
- : lda linnum+1
- : jsr linprt
- : jsr space
-
- ;*** get two bytes than one byte
-
- : jsr chkcom
- : jsr getnum
- : stx var
- : ldx linnum
- : lda linnum+1
- : jsr linprt
- : jsr space
- : lda #00
- : ldx var
- : jsr linprt
- : jsr space
-
- ;*** get one byte
-
- : jsr getinx
- : lda #00
- : jsr linprt
- : rts
-
- space lda ","
- : jmp chrout
- : jsr linprt
-
- send'var = *
-
- : jsr chrget
- : jsr ptrget
- : sta index
- : sty index+1
- : ldy #00
- : lda #estore-store
- : sta (index),y
- : iny
- : lda <store
- : sta (index),y
- : iny
- : lda >store
- : sta (index),y
- : rts
-
- store = *
- : .asc "send this stuff"
- estore = *
-
-
-
- ------------
-
- 5 ? ************
- Topic 20 Sun Sep 11, 1994
- T.BROWN25 [Tim] (Forwarded)
- Sub: Hi-Res Printing
-
- I need help compacting character data stored in RAM
-
-
- 5 message(s) total.
- ************
- ------------
- Category 5, Topic 20
- Message 1 Sun Sep 11, 1994
- T.BROWN25 [Tim] (Forwarded)
-
- Greetings to one and all,
- And thanks for reading this help request!
-
- I've encountered a bit of a dilemma while coding a paint program and would
- appreciate any advice on how to deal with it.
-
- The system I'm working with is a C64 & 1541 II, no JIFFYDOS or any other
- enhancements.
-
- Basically, the program is a utility to create multicolor bitmap screens
- for use in other programs. RUNPaint, DOODLE, and GEOS may be similiar. You
- can't easily use GEOS pics in non-GEOS programs, however.
- I want to prevent the tool icons from cluttering the drawing area, and to
- not have to scroll. The whole screen as it appears in the using program needs
- to be visible. The program will have several features, but for now, this is
- what is coded:
-
- - multicolor bitmap
- - keyboard & joystick control
- - line draw routine
- - 16 x zoom
- - printing keyboard characters in
- 8,10,12,14, & 16 point sizes
-
- Future enhancements: mouse, REU, patterns, etc.
-
- Everything is coded in machine language and bug free. The program works
- fine for now. The problem that I have is that the character data eats too
- much memory
- KERNAL ROM is the only ROM I use, no BASIC or CHARACTER ROM involved in the
- program. For now there is plenty of available RAM.
- However, if a selection of styles to print is desired, (and it is), another
- set of character data would break the bank.
-
- What I need is a way of compacting my character data.
-
- What follows is an example of how I print characters to the screen. The
- size of the character will determine the number of pixels tall, or rows.
- Using bit-pairs, more than one screen byte may have to be used per row. An 8-
- point character will have 4 bit-pairs in each of 8 rows. A 10-point
- character will have 5 bit-pairs in each of 10 rows, etc.
-
- 8-point: 00000000
- 00001100
- 00111111
- 00110011
- 00111111
- 00110011
- 00110011
- 00110011
-
- 10-point: 00000000 00000000
- 00001111 00000000
- 00111111 11000000
- 00110000 11000000
- 00110000 11000000
- 00111111 11000000
- 00111111 11000000
- 00110000 11000000
-
- 00110000 11000000
- 00110000 11000000
- 00000000 00000000
- 00000000 00000000
- 00000000 00000000
- 00000000 00000000
- 00000000 00000000
- 00000000 00000000
-
- What I would like to be able to do is have one size defined in RAM and be
- able to expand it at will to fit the other sizes.
- But, as can be seen from the above examples, taking the data from the 8-point
- character and manipulating it to form the 10-point character is not exactly
- feasable. Therefore, a seperate set of data is required for each size
- character set.
-
- At present, I've compacted the 20 bytes that define the 10-point "A" in
- the above example so that it takes only 12.5 bytes to store the data. The
- data is stored 10 bits at a time like so:
-
- 00000000 00000011 11000011 11111100
- 11000011 00110000 11001111 11110011
- 11111100 11000011 00110000 11001100
- 00110000
-
- During printing, a subroutine breaks-up the data and aligns it into columns,
- then plots it to the screen.
-
- So, for one font with all sizes, the memory requirements for storage is as
- follows:
-
- 8pnt- 8 x 91 char = 728 bytes
- 10pt-12.5 x 91 char = 1137.5
- 12pt- 18 x 91 char = 1638 bytes
- 14pt-24.5 x 91 char = 2229.5
- 16pt- 32 x 91 char = 2912 bytes
- -------------
- total = 8645 bytes
-
- What could I do differently to save memory and still accomplish the same
- thing? I'd like to have different styles in memory at the same time; at
- present I can't.
-
- If anyone can understand this spaghetti that I've written, please give me
- whatever advise that you can. I thank you in advance.
-
- Sincerely,
-
- T.J. Brown
- ------------
- Category 5, Topic 20
- Message 2 Sun Sep 11, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- TB:
- TB> 8-point: 00000000
- TB> 00001100
- TB> 00111111
-
- TB> 10-point: 00000000 00000000
- TB> 00001111 00000000
- TB> 00111111 11000000
-
- TB> taking the data from the 8-point character and manipulating it
- TB> to form the 10-point character is not exactly feasable
-
- Why not? It seems to me that the only problem you are running into here
- is locking yourself into thinking in terms of 8 bit bytes. I can
- understand why, but from what you are showing here, except for the
- height, it would be a fairly straight forward procedure to create
- wider or narrower characters.
-
- Perhaps it is the 'spaghetti' you have written. I know I've talked to
- you about this before. What algorithm did you use to finally compact
- the font you have compacted. I can see one tricky part would be the
- fact that you are working with multi-color, but your point sizes are all
- in multiples of 2, right? Here is what I suggested to you before, as
- I remember it.
-
- Decide on one or more 'key' bits in a letter's byte, perhaps decided by
- the point size being rotated. For example:
-
- 10 pt. bits 6/7
- 14 pt. bits 4/5
- 12 pt bits 2/3
- 16 pt bits 0/1
-
- Then, your expansion routine could duplicate the appropriate bit pairs
- while expanding... for example, using the above scheme, your routine for
- a 10 point font would duplicate bits 6/7 in the expansion, giving you
- a 10 point 'emulation' of th original character... it would have 2
- extra bits in it, which I don't think you are going to be able to avoid
- under any circumstance, for each row of the character in the bitmap,
- but they would be 'predictable' throughout any character set,so to speak.
- Such a scheme would probabl work from the middle instead of the ends of
- course (in terms of bit pairs duplicated). The height would be done
- similarly as far as deciding which 'row' of bit pairs was duplicated
- in the final character (or rows) to get the desired extra number of
- rows to bring the character up to final height. Does this make sense?
- If I were doing the project, I *think* this is the approach I would take
- as I understand things right now.
-
- From you demo characters, the only fly in the ointment above would be
- the 16 point characters, believe it or not, because one row of your
- example (one column actually) is all '00' pairs, naturally, to allow
- for intercharacter spacing. The obvious solution to this (to me) is to
- make the column affected by a 16 pitch the same as the one for 14 pitch,
- or else make it user-selectable between pairs 2/3, 4/5, and 6/7... if
- you get my drift... this could even be presented as a feature, allowing
- a minor difference between characters in a given font. (You could evene
- extend the principle, I suppose to include 10, 12, and 14 point fonts,
- AND to the height expansion as well).
-
- For example: For a 10 point font, you need 10 bits for your character.
- Create it using ASL:ROL combinations, but when you get to the specified
- 'duplicate' bit pair, do it twice. When you get to the specified
- 'duplicate' row of bit pairs, do the whole row twice. For a 12 point
- font, you would have 2 specified bit pairs and 4 specified rows of bit
- pairs. For 14, you would have 3 specified bit pairs and 6 specified
-
- rows of bits, and for 16, you would have all 4 bit pairs and all 8 rows
- for duplication. In each of the expansions, you could allow user selection
- of which bit pairs and rows were slated for double expansion in both
- directions, even allowing them to be the same ones... lots of effect with
- no RAM overhead, even with a single font.
-
- The down side is the same as what I mentioned before. You have to track
- the position of each character so you will know where to start next.
- You have to stop thinking in terms of 8 bit 'cards', tho this might
- just involve only keeping a record of where the previous character
- started in the bit map and adding an appropriate amount to get to the
- next location.... same for the height. You would have to do this anyway
- unless you are sticking exclusively to starting on 8 bit boundaries,
- which I can't imagine you would be doing.... you said you already have
- plot routines. Incidentally, a down side of all of this is that it would
- probably preclude proportional font, but that might be kind of limited
- anyway by the multi-color thing. But if it was important, you *might*
- want to take a clue from the way proportional font characters are
- defined for printers that support user-creatable fonts... they have
- specifiers I believe, right in the character set, to tell the printer
- how much spacing is required by the character, etc.
-
- I guess all this is enough to consider for now. Remember, the above is
- only theory, not any practical experience. It may be too confining for
- what you want to do. In theory, though, I believe it does what you
- want. It eliminates the need for compaction entirely... it would use
- normal font files and just work with the data from there, giving you also
- a very predictable location for data for all characters, which would
- allow you a way to set up a table to use to determine absolute inter-
- characer spacing required for each character... perhaps 2 tables, one
- for space 'before' the character and one for number of actual pixels
- in the character. That seems like it would work quite nicely at a cost
- of no more than 512 bytes. (I like that idea. hehehe :)
- ------------
- Category 5, Topic 20
- Message 3 Sun Sep 11, 1994
- CBM-ED [e.g.bell] (Forwarded)
-
- BTW, why ar you using only 91 characters? And how are you arriving at
- half-bytes (14pt-24.5 x 91 char = 2229.5)?
- ------------
- Category 5, Topic 20
- Message 4 Thu Sep 15, 1994
- T.BROWN25 [Tim] at 21:59 EDT
-
- Thanks for replying e.g.bell,
-
- Believe me, since we first talked, I've taken your advice to heart and
- have been working on it. There are problems, however. (And just to get this
- out of the way, the spaghetti I was referring to was the BB message, not my
- code:)
-
- Aesthetics is the primary goal, then compactness. I'm trying to find a
- way to comply with your suggestions, but looking at the examples in the first
- post:
-
- To convert the 8-point to 10-point, bits 2 & 3 could be duplicated and then
- inserted at that position for each row to create the 10-point; rows 3 & 4
- duplicated, also. (Counting bits R to L starting w/0)
- The same algorythm wouldn't work on the letter "B", however. The bit
- duplication is fine, but different rows.
-
- I'm beginning to see some light in the dark recesses of my mind after
- reading your suggestion of two tables; one for the data and perhaps one to
- indicate which rows/bits to manipulate.
-
- I do appreciate your suggestions, Ed. Like Johnny5, though, I need lots
- of input. I'm hoping that my post will draw several schemes that I might
- tweak.
-
- As to your question of my present algorythm, I've compacted the 20 bytes
- that define the 10-point "A" into 12.5 bytes:
-
- 00000000 00000011 11000011 11111100
-
- 11000011 00110000 11001111 11110011
-
- 11111100 11000011 00110000 11001100
-
- 00110000
-
- Every ten bits is a row in the letter. The subroutine reads the first two
- bytes and stores them. The bits in the template are then ROL'ed twice. Bytes
- 2 & 3 are then stored, etc.
- After ten iterations, the stored data is then manipulated based upon the
- position it is to be plotted to, AND'ed with the appropriate value, and then
- plotted to the screen.
-
- Your other question was pertaining to 1/2 bytes. You're right. 20 into
- 12.5 should be 20 into 13.
- 91 characters is another space saver. Since this is a paint program, I left
- out the graphic characters from the character sets. Also, reverse characters
- are accomplished by EOR'ing the data rather than a seperate set of data.
-
- Thanks for taking the time to reply, Ed. You've been quite a help and I'm
- looking hard at you're solution. Hope to hear from you again.
-
- T.J. Brown
- ------------
- Category 5, Topic 20
- Message 5 Fri Sep 16, 1994
- CBM-ED [e.g.bell] at 04:51 EDT
-
- TB> To convert the 8-point to 10-point, bits 2 & 3 could be
- TB> duplicated and then inserted at that position for each row to
- TB> create the 10-point; rows 3 & 4 duplicated, also. (Counting
- TB> bits R to L starting w/0) The same algorythm wouldn't work on
- TB> the letter "B", however. The bit duplication is fine, but
- TB> different rows.
-
- Then go back to a table lookup message for each of the characters...
- From your scheme, it seems to me that each table would take only 91
- bytes, and each byte could be a bit mask of which bits get duplicated.
- That way you 1] have a map for the algorithm to use when duplicating the
- characters, and 2] a way to allow other fonts to be created... namely
- saving the TABLES instead of the characters.. see what I mean. Your
- program need not deal with character sets at all, just the bit map
- tables... except for the 1 8 point character set.
-
- I never figured my post would answer all of your questions, just jog the
- thought process.
-
- I thought later about the reversing of chars as far as my asking about
- only 91 chars/set. :) Tho what I'm suggesting here would allow all of
- them at a minimal addition of bytes, and nowhere near what you are
- currently using to do the same thing.
-
- Does this all seem to clarify anything? :)
-
- BTW, you would need 2 91 byte tables for each point size other than 8,
- which is still only like 1400 bytes or so for all point sizes for any
- font.
- ------------
-
- 5 ? ************
- Topic 22 Sat Oct 08, 1994
- W.OVE at 15:02 EDT
- Sub: Boot sector Information
-
- I would like to know the format of the boot sector.
- 11 message(s) total.
- ************
- ------------
- Category 5, Topic 22
- Message 1 Sat Oct 08, 1994
- W.OVE at 15:07 EDT
-
- I know that the first 3 bytes are cbm. It is followed by the file name to be
- booted. If the file name is followed by machine code, is that code loaded into
- the drive or is it loaded into the computer. I am trying to make an auto boot
- disk not auto boot. but removing the boot sector keeps the program from
- loading. It seems to me I could write a program to get the program to boot
- up, But I am not sure what to do with the code following the file name. I have
- been unaable to find any information on this is the libs.
-
- thank you w. ove
- ------------
- Category 5, Topic 22
- Message 2 Sat Oct 08, 1994
- CBM-ED [e.g.bell] at 17:01 EDT
-
- Bill: I'll have the information for you hopefully by tomorrow.
- The code is loaded into the compter, though, for that part of
- uour question. There is also a checksum or CRC calculated from the
- code in the boot sector.
-
- I have a very good reference I just have to locate it so I can give
- you the correct information, and I'm not going to have a chance today.
- BTW, have you tried to BOOT your program from the drive instead of
- loading it?
-
- i.e. boot "program",u<device>
-
- ------------
- Category 5, Topic 22
- Message 3 Sat Oct 08, 1994
- CBM-ED [e.g.bell] at 18:12 EDT
-
- Bill: Here is hopefully enough information to help you solve your
- problem:
-
- Boot sector data:
- Bytes Function
- 0-2 CBM identification code
- 3-4 Memory address for following boot sectors
- 5 Configuration index for following boot sectors
- 6 Block counter for number of following boot sectors
- 7 to 1st 0 Boot message - null terminated
- next byte to 0 Name of program to load - null terminated
-
- Bytes following the filename null-terminator is any machine langauge
- code to be called by the boot process.
-
- Finally...
- "The bytes following the filename are interpreted as a machine language
- program and the boot routine passes control to this program. From this
- point on, the programmer is responsible for starting the program
- loaded, or for loading another program, or for branching to another of
- the boot blocks."
-
- The above information is quoted from the Abacus book '128 Internals',
- pages 188-190. There is more information there, but it seems the above
- will get you where you want to go. Let us know how you make out.
- ------------
- Category 5, Topic 22
- Message 4 Sun Oct 09, 1994
- W.OVE at 11:28 EDT
-
- Thanjk you for your prompt reply.
-
- I have been able to modify the superbase v3 boot disk so that it can be used
- for storing other programs etc. without interfering with superbase loading. I
- have moved other programs to the disk and am able to load them and run them.
- The problem is that every time I reset or quit superbase it reloads itself.
- Superbase will not reload unless you reset the system or you simply type
- "boot" <return>. I was hoping that I could make so type of loader program that
- would provide the information that is currently in the boot sector and so
- eliminate the boot sector so that I would not be bothered with always removing
- the disk from the drive. The boot sector is set up exactlly in the manner that
- you indicaated. In the 1581 manual it talks of booting information being
- loaded into the drive when using a file named CBM of the type "user". I think
- I need to know where that machine code get loaded. Are the first two bytes of
- the code a load address? I am perhaps in way over my head.
-
- thank you w. ove
- ------------
- Category 5, Topic 22
- Message 5 Sun Oct 09, 1994
- CBM-ED [e.g.bell] at 18:51 EDT
-
- Bill:
- WO> In the 1581 manual it talks of booting information being loaded
- WO> into the drive when using a file named CBM of the type
- WO> "user". I think I need to know where that machine code get
- WO> loaded. Are the first two bytes of the code a load address
-
- I believe that what you are talking about is someting totally unrelated to
- boot sectors. There is a file you can create for the 1581 that will auto
- execute but it is unrelated to specific software. It is a feature anyone
- can use, and in fact, someone even published a way to use such a file to
- actually move the boot sector to another area on the disk. This peculiar
- feature is used to boot CP/M disks, if I remember correctly, because they
- cannot give up the normal boot sector due to their directory location.
- I'm not saying that nothing is loaded into the drive by superbase. I don't
- know that. If it is, you probably are in over your head. I only say that
- because I've never done any drive RAM programming, and I feel personally
- I'd have to work pretty hard to get it done. The file you are talking
- about on 1581 disks will always be named 'COPYRIGHT CBM 86',and does not
- get tied to specific software unless they have made it do that. Is there
- such a file on your disk. If so, read the 1581 manual on page 87. It
- says the first 2 bytes contain the load address, the 3rd byte contains the
- length of the code/chars to follow, and finally a trailing checksum. It
- also says the load address is the start address for the code.
-
- Are you saying that when you just QUIT from superbase that it reboots
- itself??
-
- WO> every time I reset or quit superbase it reloads itself
-
- You may have to disassemble the boot sector to do what you want to do.
- That is unless the boot sector is only booting the program and nothing
- more. Still, that is not such a daunting task, I wouldn't think. How
- many sectors could it be?
- ------------
- Category 5, Topic 22
- Message 6 Sun Oct 09, 1994
- H.HERMAN1 at 22:43 EDT
-
- Here's one thing that you may want to try, but if you do, do it carefully:
-
- (1) Using a sector editor, block copy the boot sector from the SuperBase
- disk, onto another.
-
- (2) Then fill the boot sector on the SuperBase book with nulls.
-
- (3) Try running SuperBase from the newly changed disk. If it runs okey, you
- are home free. If not, then write back the boot sector which you earlier
- saved, back onto the SB disk.
-
- One note of caution: If this does work, I would still permanently keep in
- storage that boot sector, in case it turns out that some rarely used part of
- SB needs that code to properly run.
-
- I did something akin to this on my very heavilly copy-protected Pocket Filer 2
- disk. This particular disk always sits in drive 8. RAMLink will usually
- autoboot "Main Menu", as it is supposed to. But at times, some programs exit
- by booting unit 8. Therefore, I wanted to change the boot sector to also boot
- "Main Menu", and not to boot Pocket Filer 2.
-
- The boot sector for Filer 2 is safely tucked away on a storage disk, and
- instead that sector was over-written with the custom boot. To my delight it
- has no effect on Filer2. However, even if it did, there is no harm done, as
- that sector could be resurrected.
-
- One more word of caution: anyone fooling around with ANY Pocket disk must be
- very careful, as only some sectors are "user accessible". Most of the Pocket
- disk cannot be accessed without destroying the disk, due to the copy-
- protection. So "BE CAREFUL"!!!!
-
- Howie
- ------------
- Category 5, Topic 22
- Message 7 Tue Oct 11, 1994
- W.OVE at 19:33 EDT
-
- I have tried the following things without success. 1) I did fill boot sector
- with nulls. Program won't load. 2) I tried loading the machine code into
- computer using first two bytes as load address then sysing to it. Locked up
- computer. Loaded machine code into drive ram using first two bytes as load
- address Resulted in horrible racket will not be repeated.
-
- I would like to make another try. I need to know what the computer does when
- it boots a program after a cold start. You get a message booting.. Is that
- message generated by the computer or is that comming from the drive. I did
- notice on a memory map that an area is identified as boot sector work space.
- What goes in that space?
-
- I tried to dissamble the machine code and it seems to be gibberish. I started
- the dissambly from the beginning and again from other bytes. But nothing
- dissambled to anything more that a whole lot of question marks and seldom used
- instructions. ( not an lda in the lot).
-
- Thank your for your help and sugestions. I am not a programer. I merely hack
- to try and get thing the way I want them to be. w.ove
- ------------
- Category 5, Topic 22
- Message 8 Tue Oct 11, 1994
- CBM-ED [e.g.bell] at 22:10 EDT
-
- Bill:
- WO> You get a message booting.. Is that message generated by the
- WO> computer or is that comming from the drive.
-
- That message is generated by the computer. I would have to do some
- research as far as your other questions go. I don't know how you tried
- to disassemble the machine code either... from the boot sector? If so,
- can you save it to a file and upload it? How big is it? When you do the
- disassembly, or I should say instead of doing a disassembly, use the 'm'
- command of the monitor to see if what you are looking at is text instead
- of code.
-
- WO> 2) I tried loading the machine code into computer using first
- WO> two bytes as load address then sysing to it. Locked up
- WO> computer
-
- I have found through experence that when a SYS locks up the computer it
- is very frequently because the proper MMU configuration is not in
- context. Try this again, but explicitly force the configuration with the
- BANK command. Try bank 15.
-
- What machine code did you load into the drive RAM anyway? From what I see
- of the info I have on $0b00 block, when an auto boot disk is detected, the
- sector 0 of track 1 is read into this area, and the 1st 3 bytes examined.
- If the CBM is detected, the boot process proceeds. "It would be possible
- to simulate a boot by filling the buffer with the proper values, then
- jumping into the BOOT_CALL routine at address 63737/$f8f9.
-
- Try booting the disk, but pressing STOP before it is complete. Then
- examine the contents of this area. Duplicate that, then proceed with the
- call (BANK 15) listed above). Perhaps that will help you emulate what the
- actual boot sector does. BTW, the book (Mapping the 128) says that there
- is a Kernal jump table entry for the boot routine at 65363/$ff53, which
- you should use if you do all of this. Try it first, and if it doesn't work
- try the other one. Let us know how you make out.
- egb
- ------------
- Category 5, Topic 22
- Message 9 Wed Oct 12, 1994
- H.HERMAN1 at 06:32 EDT
-
- >I have tried the following things without success. 1) I did fill boot sector
- >with nulls. Program won't load....
-
- When you did this, did you: dload"filename",u8 <-- or whatever drive?
-
- In other words, did you try to DLOAD, instead of BOOT?
-
- Howie
- ------------
- Category 5, Topic 22
- Message 10 Fri Oct 14, 1994
- CBM-ED [e.g.bell] at 06:44 EDT
-
- Bill: Try bloading the file called 'sbloader' and tell me what happens.
- From the demo boot sector you sent me, I can tell several things. First,
- there seems to be only the one boot sector involved. There is no boot
- message, and no machine language follows the boot procedure, at least
- nothing valid. I even checked my list of undocumented opcodes and it does
- not seem that they are involved.
-
- One of the autobooting schemes that is used is to load programs in over the
- operating system vectors. After the load, then, when the system takes a
- normal jump through certain vectors, it is directed to code loaded into
- that area, which in turn would finish up the loading process. This may be
- what is happening here. You will know this is what is happening if you
- do the bload above and the full program loads and then auto-starts. If
- it doesn't auto-start, it may still be that all you have to do is SYS to
- the start address of this file once it is loaded. Give this a try and
- let me know how you make out.
- egb
- ------------
- Category 5, Topic 22
- Message 11 Sat Oct 15, 1994
- W.OVE at 11:14 EDT
-
- I have tried all the sugestions and I really appreciate you taking the time to
- respond. the program "sbloader" is the same strange jumble of information that
- is contained in the boot sector. I have broke into the progrm during the boot
- process and can only report that I am very confused by what it is doing.
-
- However on the good news front I solved my problem of the program
- autobooting, by copying the boot sector the program "sbloader" and a couple
- other files to different disk and have erased them on the other disk. So now
- the program doesn't boot and I caan boot it off drive 9. The loader loades in
- from drive 9 and the it does a normal load of the program on drive 8. It is a
- left handed solution for sure, but it does what I was hoping. thank you for
- your assistssnce. w.ove
- ------------
-
- 5 ?