Announcement

Collapse

Forum 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.


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.


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.



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.


"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.

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

Build IBM 5150 BIOS from Source

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

    Build IBM 5150 BIOS from Source

    Whilst on my journey to upgrade my 5150 to a 486, I've encountered a problem with the original IBM BIOS. Unfortunately, for some reason, the combination of a Transcomputer HPi 486 and Intel Inboard cause the BIOS's 8253 or 8259 test to fail, thus halting the system. If I swap the BIOS for a generic turbo xt bios, the system is able to boot. However, I would like to use the original BIOS if possible. I've determined the necessary edits that need to be done to the original BIOS to disable this check (along with a checksum disable), however I can't seem to figure out how to assemble the file. I know that the bios must be built with Intel's ASM86 2.0, but I don't know how to do this. There is a copy of ASM86 3.0 available for DOS, however it seems that 2.0 existed only for Intel development systems. When attempting to build the source with ASM86 3.0, I get an error (which also has no line number reference unfortunately), and a .lst and a .obj file, which I don't know how to link. Using the Intel LINK86.exe, I just get a .LNK file. Does anyone know how to properly build this BIOS?

    #2
    This document links to a copy of ASM86 V2.1 on bitsavers.org

    http://www.os2museum.com/wp/the-ibm-...intel-isis-ii/

    The actual file to download is

    http://bitsavers.org/bits/Intel/MDS/...9700030-06.img

    Comment


      #3
      Originally posted by willmurray461 View Post
      Does anyone know how to properly build this BIOS?
      What I did was converting the text to NASM format. Unfortunately the outputted BIN file is not the same as the original one: Nasm translates some instructions into other but equivalent codes than NASM/TASM does. I did disassemble various BIOS of some Commodore PCs, assembled the results with NASM, calculated e new checksum byte and those PCs ran just like if the original BIOS had been inserted.
      If interested, I have the 1981-04-24 BIOS in NASM format, but not documented. I created a little tool that checks for differences of the generated BIN with the original ROM. If found, it checks if the difference is an instruction that can be translated into more than one binary code. If indeed, it continues testing, if not, I have to find out where things went wrong. If an error occurs, in most cases the code generated by NASM has a different size, resulting in bytes that don't match with the original ones anymore after that instruction. In that case I replace the instruction with a DB statement.

      With kind regards / met vriendelijke groet, Ruud Baltissen

      www.baltissen.org

      Comment


        #4
        In case anyone wants to know, I now know how to edit and compile the 5150 '82 BIOS (and theoretically any other IBM BIOS created for the ASM86 Macro Assembler). Using the guide here, I was able to learn the syntax for the command line tools needed (ASM86.EXE, LINK86.EXE, LOC86.EXE, OH86.EXE, DXC.EXE), and run them in DOSBox to create a byte-for-byte copy of the original BIOS. The real trouble was finding DXC.EXE, which is needed to convert the output file in Intel Hex format into a usable plain binary. At first, I couldn't find it anywhere on the internet as it wasn't packaged in any of the archived Intel toolchains (or anywhere else, for that matter), so I tried some other programs that claimed to be able to do the same thing. I tried various versions of hex2bin for DOS and Windows, as well as srec_cat on OS X, but neither of them worked properly (either giving errors or producing strange 1MB bin files). Eventually, I contacted the owner of the website and he kindly sent me the file I needed. Without him, none of this would have been possible, and I'm curious as to how he got the file in the first place. Anyway, I'll attach the files here for anyone else who wants to give it a try.

        Comment


          #5
          Where did you get the source code of the original BIOS?

          Update: more info here -> https://github.com/jeffpar/pcjs/blob...src/PCBIOS.TXT

          Which itself is probably a copy of somewhere else
          Last edited by atg; June 20, 2021, 06:54 PM.

          Comment


            #6
            Hi,

            Can you build me the BIOS for the IBM 5160 and out put the IBM logo ? Big "I B M" blue text on black background. That will be chick!!!!

            Comment


              #7
              I'm sorry for side tracking this completely awesome thread but I'm going to do it anyway. Has anyone ever found the source code to the IBM 5150's cassette basic which is loaded into ROM?
              Once upon a time, the internet sucked because it came through the phone. Now the phone sucks because it comes through the internet.

              Comment


                #8
                Originally posted by tonata View Post
                Hi,

                Can you build me the BIOS for the IBM 5160 and out put the IBM logo ? Big "I B M" blue text on black background. That will be chick!!!!
                If you're asking me, I'm not too much of an expert when it comes to assembly. I also don't really have the time right now. It might be really easy, requiring only BIOS interrupts (I'm not sure if you can call one from within the BIOS though). It might also be more complex, requiring manipulation of CGA color registers. Either way, If you really want this, I suggest you try on your own. Assembly can be a daunting language to try to learn, but with the right literature it can become understandable.

                Originally posted by Exceter View Post
                I'm sorry for side tracking this completely awesome thread but I'm going to do it anyway. Has anyone ever found the source code to the IBM 5150's cassette basic which is loaded into ROM?
                We have the source code for the 5150/5160/5170 BIOS's thanks to their listings being published in IBM Technical Reference books, presumably to help programmers. However, AFAIK, no versions of ROM Basic ever had their source code published. If there is a version of the source code out there, it would likely be in the hands of one of the original developers, or someone who inherited it from them. It would also likely be on a disk readable only by Intel ISIS development systems, something few people have.

                Comment


                  #9
                  How feasible would it be to disassemble it into something that compiles?
                  Once upon a time, the internet sucked because it came through the phone. Now the phone sucks because it comes through the internet.

                  Comment


                    #10
                    It's definitely possible to reverse engineer binaries, however it requires someone with enough time and the right expertise. In any case, I wouldn't really hope on it ever happening unless you taught yourself how to do it though...

                    Comment


                      #11
                      Originally posted by Exceter View Post
                      I'm sorry for side tracking this completely awesome thread but I'm going to do it anyway. Has anyone ever found the source code to the IBM 5150's cassette basic which is loaded into ROM?
                      Microsoft wrote the 5150's cassette BASIC and the BASIC.COM / BASICA.COM "extensions". Source for the ROM is unavailable, but the GW-BASIC sources circa 1983 have been released by Microsoft:

                      https://github.com/microsoft/GW-BASIC

                      I suspect that large portions of the ROM will match with what's in the GW-BASIC source. With enough time you could essentially cross-reference the ROM disassembly with those sources and produce a coherent listing of the ROM with proper symbols and labels and comments.

                      (I've been working to do this for the PC-DOS 1.10 version of DEBUG.COM, using the MS-DOS 2.11 sources as a reference.)

                      Comment


                        #12
                        That sounds like a great strategy. Sadly, it's not something I'd be able to put time into anytime soon.
                        Once upon a time, the internet sucked because it came through the phone. Now the phone sucks because it comes through the internet.

                        Comment


                          #13
                          One kind of gross thing about the Microsoft BASIC source code for the IBM PC is at the time Microsoft maintained a lot of the "core" parts of their code as a semi-machine-independent pseudocode (Mostly based on how the 8080 rolls, I believe?) so the resulting assembly that's available (Microsoft hasn't released the secret sauce it's based on) isn't the easiest thing in the world to follow.
                          My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs Also: Blogspot

                          Comment


                            #14
                            Originally posted by Exceter View Post
                            How feasible would it be to disassemble it into something that compiles?
                            It is compiled now So if you disassemble it, it should still compile - on the assembler which you used to disassemble it. What you'll lose are all the variables, symbols, offsets, etc. which the original programmers put there.

                            I have been wanting to disassemble and de-entangle the Cassette BASIC ROMs for a little while now.

                            I will report back with my progress.

                            Obviously it wouldn't be possible to get the original source code by this method, but my goal is to get an understanding of how they work.

                            Originally posted by kdr View Post
                            I suspect that large portions of the ROM will match with what's in the GW-BASIC source. With enough time you could essentially cross-reference the ROM disassembly with those sources and produce a coherent listing of the ROM with proper symbols and labels and comments.
                            This might work, but for my purposes I wasn't planning on doing it. I could do a cursory check of the BIOS binary and the COM binary to see where if at all they are the same

                            Comment


                              #15
                              This might work, but for my purposes I wasn't planning on doing it. I could do a cursory check of the BIOS binary and the COM binary to see where if at all they are the same
                              Would dumping them to text files as hex and using a regular text diff tool tell you anything useful?
                              Once upon a time, the internet sucked because it came through the phone. Now the phone sucks because it comes through the internet.

                              Comment

                              Working...
                              X