Announcement

Collapse

Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

Bootstrapping KERMIT onto CP/M-86

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bootstrapping KERMIT onto CP/M-86

    Don't know if anyone has any ideas here... I'm trying to bootstrap some form of comms program onto my Victor 9000 under CP/M (I have MS-DOS comms working fine, but you can't copy from dos to CP/M on this system so far as I can tell!)

    I've found the cp/m-86 kermit archive, but I think I'm going to need ASM86 to do anything with it...

    All I've got is PIP and MS BASIC 5.2 :-/

    All thoughts gratefully received!

    #2
    drdanj,
    There is always PIPMODEM.ASM & PIPMODEM.DOC,and MBOOT3.ASM. Plus, you can patch PIP (PIPIO) to be able to transfer smaller
    programs, or small blocks of code, and then mload several to create the *.COM file. Are you wanting Kermit or Modem7 or xxxx,
    which will depend on your RS-232 Hardware and Driver. If you know which USART the machine has you might not have to write a
    driver.

    I sent you a PM, so lets start there and go forward. I need to know a bit more information on the Victor 9000.

    Larry

    pipmodem.asm.txt PIPIO.ASC.TXT

    Comment


      #3
      Replied to PM - the problem we have here is nothing else can write the disks, and I don't have DDT86 or ASM86 There's a kermit version for the victor 9000, so that's probably the easiest thing to get working in the first instance.

      Comment


        #4
        Hi drdanj

        Step 0: Prerequisites
        Bootstrapping Kermit is fairly easy (but time consuming) if you have certain prerequisites in place:
        • Target machine that boots CP/M, has RS232 port, PIP.COM and LOAD.COM and has a configuration program for the serial port.
        • PC with a serial port and terminal emulator such as Hyperterm or Teraterm.
        • Null modem cable to connect PC and target machines with the right plugs on each end.
        • A copy of the files CPSKER.HEX and the customisation file for the target machine - find them here: http://www.z80.eu/kermit.html. I see nothing for a Victor 9000 there, so you should try the CPVGEN.HEX file.
        • A copy of the file MLOAD.HEX from ftp://kermit.columbia.edu/kermit/a


        I will assume you have these already.

        Step 1: Set up basic serial coms
        Connect the machines together using the null modem cable. Go into the terminal program and set the serial port to 300 baud, 8 bits, no parity, 1 stop bit, no handshake. Set the terminal to local echo. On the target machine, launch the configuration program and set the serial port to match.

        Now let's do a little test. On the target machine, enter the command pip a:test.txt=rdr:[e] . This launches pip and listens to the rdr: device, which is normally configured as the serial port. Nothing will happen and that's because it's waiting for serial data. Switch to the PC and (in the terminal program) open the connection you configured and enter some text in the window. Any ASCII will do. You should see the characters appearing on the screen of the target machine, because we specified "eho" option in the pip command (that's the [e] part of the command). After doing this, type ^Z (CRTL-Z) and you should hear disk activity on the target machine. Pip is writing the text you entered to the file. Check the file is correct by entering type test.txt on the target. You should see the same text you entered appear on the screen.

        Step 2: Determine the size of PIP's file buffer
        During the test of Step 1, you transferred text to the target and created a file copy. We need to do this for CPSKER.HEX and the customisation file (which I will call CPVGEN.HEX during this description). However, there is a problem. When pip receives a file from the serial port, it copies the data into a buffer which, when full, is written to the output file. While it is doing this, it isn't listening to the serial port, and so it misses any data sent while it is writing to the file. This is bad! So, we need to do some experiments to work out how much data it can receive into its buffer before having to write to the file. The easy way to do this is to send CPSKER.HEX to it, and examine the file on the target to see where the break occurs. This is easy because hex files have what looks like a line number at the start of each line (it's really an address for the line).

        So:-
        • On the target, enter pip tst.txt:=rdr:[e]
        • On the PC, open CPSKER.TXT in a text editor like notepad.exe and copy the entire file to the clipboard, then switch to the terminal program and paste it.
        • You should see the hex file on the target machine window. There should be clear lines with carriage returns. If you do not see these, and it is just filling the whole screen with no line ends, you will need to set the terminal options to send CR with every linefeed, and try again.
        • You should hear the occasional disk activity on the target. Wait until the text stops scrolling on its screen. This should be becasue the data has all been sent. Go back to the PC terminal program and type a ^Z (CTRL-Z). You should hear disk activity on the target again.
        • Now let's see what we have. On the target, enter type test.txt. Be ready with ^S - this pauses the screen, and restarts it. Watch the address counter at the start of each line, you will see it incrementing. You are looking for a gap, or sudden jump in the number (it's hexadecimal so will have A B C D E F as well as 0-9). When you see it, hit ^S and take note of the highest value before the jump. Round it down to the nearest 00.


        So, we have a point at which pip's buffer is full. We can reliably transfer that much text over the serial line with no handshaking.

        Step 3: Transfer the hex files
        In order to transfer CPSKER.HEX to the target, we need to chop it up into segments that are small enough to fit into pip's file buffer, then send it a piece at a time. Go back to the text editor on the PC and locate the line that has the address we determined in Step 2. Cut the text from the start of the file to this line. Now:
        • On the target, enter pip C1.HEX:=rdr:[e]
        • On the PC, paste the cut portion of CPSKER.HEX into the terminal program.
        • Wait for the text to stop appearing on the target screen
        • Type ^Z on the PC's terminal program. You should hear disk activity on the target.
        • Look at the next line in the PC editor (should be the first line as you cut the last segment) and add the buffer size value to its address.
        • Locate the line with that address and cut from the start of the file to that line.


        Repeat these steps, adding 1 to the file name Cn.HEX each time. When you have sent all the CPSKER.HEX file, you will have a set of text files on the target called Cn.HEX, where n starts at 1 and goes up to the number of times you had to repeat the process. On the Model II I had 9 of these files.

        To transfer CPVGEN.HEX and MLOAD.HEX, you should be able to do each in one segment. Open it in the PC's text editor and look at the last lines. Note the address indicator. Hopefully it is lower than the value we determined in step 2. If so just copy the file across in one go: on the target, enter pip CPVGEN.HEX:=rdr:[e], then on the PC in notepad, copy the entire file into the terminal program. As before, wait until it stops scrolling on the target display, and enter a ^Z on the terminal. If you find that the file is too big, you will have to use the segmented transfer approach you used to copy CPSKEL.HEX across. Repeat for MLOAD.HEX.

        Step 4. Combine the files on the target.
        So, we have a bunch of files on the target that together comprise the CPSKER.HEX file, plus one file that is the customisation file. We need to combine all these files into one, and to do this we are once again going to use our best mate pip. Like this:
        • On the target, enter pip CPSKER.HEX:=C1.HEX,C2.HEX,C3.HEX,C4.HEX,C5.HEX,C6. HEX - add or remove Cn.HEX files according to how many you have. The main point is they are all there and in the correct order.
        • On the PC, paste the cut portion of CPSKEL.HEX into the terminal program.
        • Wait for the text to stop appearing on the target screen
        • Type ^Z on the PC's terminal program. You should hear disk activity on the target.
        • Look at the next line in the PC editor (should be the first line as you cut the last segment) and add the buffer size value to its address.
        • Locate the line with that address and cut from the start of the file to that line.


        Step 5 - Combine the hex files into executables
        By this point you should have a copies of CPSKER.HEX, CPVGEN.HEX and MLOAD.HEX on the target. Now we need to turn them into executables, and according to the instructions on the Kermit page I linked to at the start of this post, you need to use MLOAD.COM, so...
        • On the target, issue the command load mload.hex - this will read MLOAD.HEX and write MLOAD.COM.
        • Now, to create KERMIT.COM, enter the command mload cpsker.hex,cpvgen.hex - MLOAD will create a file called CPVSKER.COM which you should rename to KERMIT.COM with the command ren kermit.com=cpsker.com


        Step 6. Enjoy your new KERMIT executable
        That's it, you're done. You can up the baud rate on the PC and target machine and start using kermit immediately. You don't actually need hardware handshaking if you're transferring small files. Have a play, see what setup works best for you.
        Last edited by JonB; November 13, 2016, 03:26 AM.

        Comment


          #5
          Hi Jon - thanks. Unfortunately I don't have LOAD.COM (I should also re-iterate this is CP/M-86) on my CP/M disk - just PIP, PBASIC86, ED, ERA, HELP, RUN, TOD, STAT, FORMAT, DCOPY, BOOTCOPY and something to set the serial port speed. I can PIP text files across from the PC fine at 9600bps. AXI: is the input from serial port A.

          Victor 9000 KERMIT for CP/M-86 is here:
          ftp://kermit.columbia.edu/kermit/cpm86/
          (XV9 being the Victor specific files)

          Comment


            #6
            Errrm, without LOAD.COM you have a problem. I just amended the description to include acquisition of MLOAD.COM but it uses a HEX file so you need LOAD.COM.

            So, what you need to do next is attempt to bootstrap it using the BASIC method, because you appear to have a BASIC interpreter. Hang on, I have an idea.... in the meantime, see if you can find a version of LOAD.COM for CP/M 86 to download on the PC.

            Comment


              #7
              Hmm, can't find LOAD - can find: GENCMD.CMD, ASM86.CMD and DDT86.CMD? -> I think GENCMD turns a H86 file (x86 hex) into CMD?

              My MS-BASIC is rather non-existant and I couldn't work out how it treats standard CP/M IO streams..

              Comment


                #8
                I have to go... see if you can work out how to use PIP to capture a binary file with the [o] parameter. Then send a CP/M 86 LOAD.COM (or GENCMD.CMD) across. If you can do that, you can use my method for building KERMIT.

                I'll look in on the thread later on today, please report your findings...

                Comment


                  #9
                  Thanks - I'll have a go at it a bit later. - my only confusion is how to make sure PIP saves the file if it's ignoring ^Z - how do you signal to quit and save what you've received?

                  Comment


                    #10
                    If you append a 0x1A byte at the end of the file you are transferring, that should be a CONTROL Z.

                    These sites have some CP/M-86 downloads available:
                    http://gaby.de/edownl.htm
                    http://www.nostalgia8.nl/mirrors/cpm86/files.htm
                    http://www.retroarchive.org/maslin/disks/cpm86/
                    http://www.retroarchive.org/maslin/
                    http://www.classiccmp.org/cpmarchive...86/ANOTHER/D1/
                    http://www.classiccmp.org/cpmarchive...6/V1-1R/DISK1/
                    http://www.classiccmp.org/cpmarchive...CPM_86/W-BIOS/
                    http://oldcomputers.net/victor9000.html
                    http://www.actsirius1.co.uk/ #Lots of good information # HOWTO --> FILE TRANSFERS #
                    http://bitsavers.informatik.uni-stut...or/victor9000/
                    http://www.old-computers.com/museum/computer.asp?c=210


                    Larry

                    Comment


                      #11
                      True, Larry, but in object mode (that's the binary mode with option [o] set), it ignores ^Z, per http://www.gaby.de/cpm/manuals/archi...#Section_1.6.4

                      [O] - Transfers non-ASCII object files. The normal CP/M end-of-file is ignored.

                      So we need a way to tell PIP that the file transfer is complete.

                      [Edit: And for me, it doesn't work. pip test.com=rdr:[o] just loads pip which exits immediately, leaving an empty test.com file.]
                      Last edited by JonB; November 13, 2016, 06:19 AM.

                      Comment


                        #12
                        I think it's a question of knocking something together in basic to get gencmd.cmd across, then the rest should (in theory!) be fairly straight forward. The alternative is to write something in BASICA in MSDOS to write files to CP/M format discs, and use that to get it there..? It might be slightly easier than trying to mess with IO streams in CP/M basic.?

                        Comment


                          #13
                          JonB,
                          Good point! I didn't know that, or if I did I forgot it.

                          Well, there is always uuencode & uudecode for DOS. I've located those at : http://lf.8k.com/TOOLS/TOOLS.HTM
                          They should work. Plus, I found those on the CPM-86 Image.

                          There is also pipmodem.asm (& .DOC) and mboot3.asm in the
                          /Walnut_Creek_CPM/WalnutCreek/CPM/STARTKIT/ subdirectory.

                          A youtube video explains the process:
                          https://www.youtube.com/watch?v=32oxnyERDgI

                          Information about bootstrapping on Superbrain (similar situation):
                          https://groups.google.com/forum/#!se...M/ElhW9adiAwAJ


                          drdanj
                          If you can tell me which files from this site "http://www.cpm.z80.de/binary.html#operating",
                          I can take the IMAGES (whatever format) and extract the files with cpmtools (under Linux)
                          for DDT-86, ASM86, and LOAD or MLOAD, plus anything else you need. I've got cpmtools
                          built with libdsk, and it works well for accessing the CP/M.

                          I'd need you to PM me your email address too!


                          Larry

                          Comment


                            #14
                            Done - and many thanks! I'm starting to delve into my BASIC options at the moment. *shakes fist at the sky*

                            Comment


                              #15
                              Try this:

                              Code:
                              10 REM Quick hack to create MLOAD.COM from MLOAD.HEX
                              20 REM (C) Jon Bradbury 2016 - VCF form member 'JonB'
                              30 OPEN "I",1,"MLOAD.HEX": REM Input HEX filename
                              40 OPEN "O",2,"MLOAD.COM": REM Output binary filename
                              50 IF EOF(1) THEN 100
                              60 INPUT #1,A$
                              70 PRINT A$
                              80 GOSUB 130
                              90 GOTO 50
                              100 CLOSE #1 : CLOSE #2
                              110 PRINT "Done."
                              120 END
                              130 H$=MID$(A$,2,2):GOSUB 210:BC=HV
                              140 H$=MID$(A$,8,2):GOSUB 210:RT=HV
                              150 IF RT <> 0 THEN GOTO 200
                              160 ENDPOS=8+(BC*2)
                              170 FOR DPOS=10 TO ENDPOS STEP 2
                              180 H$=MID$(A$,DPOS,2):GOSUB 210:PRINT #2, CHR$(HV);
                              190 NEXT DPOS
                              200 RETURN
                              210 HI=0:LO=0
                              220 HI$=LEFT$(H$,1):LO$=RIGHT$(H$,1)
                              230 IF HI$>="A" THEN GOTO 250
                              240 HI=(ASC(HI$)-48)*16:GOTO 260
                              250 HI=(ASC(HI$)-55)*16
                              260 IF LO$>="A" THEN GOTO 280
                              270 LO=(ASC(LO$)-48):GOTO 290
                              280 LO=(ASC(LO$)-55)
                              290 HV=HI+LO
                              300 RETURN
                              Given a copy of MLOAD.HEX, it will create MLOAD.COM. You now need a CPM/86 version of MLOAD.HEX, is it on the kermit site? Get that, make sure it has CR/LF line ends, transfer it across as text, transfer the BASIC program across as text, load it into your basic interpreter and run. If you need to turn other HEX files into executables, just alter the filenames on lines 30 & 40 accordingly.

                              I ran it on my Model II with MLOAD.HEX and the MLOAD.COM it produced worked flawlessly (in fact, I tested it by using it to create another version of KERMIT.COM, which also worked perfectly).

                              And I would like to say, I really enjoyed writing that! Thanks!



                              Cheers
                              JonB

                              PS, All stuff required to bootstrap Kermit-80 is attached in this zip file:

                              kermit-80 bootstrap.zip
                              Last edited by JonB; November 13, 2016, 01:33 PM.

                              Comment

                              Working...
                              X