Hot answers tagged

92

In the late '70s and very early 80s it was not unusual to make BIOS source code available. Apple did indeed do so; the full source listing starts at page 76 of the Apple II Reference Manual. Atari did the same in their Operating System Source Listing section of their Atari 400/800 Technical Reference Notes. For CP/M machines, having the BIOS source was near ...


64

When other manufacturers attempted to copy the BIOS from the source listings, IBM sued them for copyright violation and won. Besides, even without the listings, anyone would have been able to dump and disassemble the BIOS. Publishing the source code made it harder to argue that the engineers hadn’t seen or used it. What took IBM by surprise was the ...


34

The architecture of the original IBM PC (and its clones) let the BIOS access the video memory directly. So making nice text layouts did not require positioning the cursor or making a sequence of calls like you would do with curses: It was sufficient to set the text mode at startup and write at the right place in memory the character (1 byte) and its ...


31

Harry Potter and the Half-Blood Prince is another work whose source code is entirely available for public view, yet it's definitely under copyright and you will get in big trouble for commercially copying it. Making it public and releasing it from copyright are two separate things. In order to clone the IBM BIOS, they had to write totally new software ...


28

TUI-drawing code can be pretty compact when you're working in assembly and relying on the IBM video BIOS to do the heavy lifting. For example: INT 10h/AH=06h and INT 10h/AH=07h can be used either to scroll a rectangular region of the screen or to clear the screen to a specified foreground/background colour combination. INT 10h/AH=09h can be used to tile a ...


28

Just because they released the source code didn't mean that copyright no longer applied. They didn't "open source it". Having access to the source was as effective documentation on interoperating with the machine as anything was. Back in the day, we had a stack of microfiche (I'd guess 100+ pages of fiche film) with (apparently) the source code to DECs VMS ...


16

In a 100% compatible PC, NMI is used only to communicate unrecoverable errors — normally a RAM parity failure, but possibly something else, which should reveal itself via one of the system control ports, specifically you should check: Port A: b4: watchdog timer status; Port B: b6: channel check failure (i.e. a bus failure, likely a peripheral device); b7:...


15

Just a disclaimer: Most of this is based on observation and assumptions from experience and should be taken with a grain of salt. From what I've seen with this glitch, the audio being played is actually just a very stretched out version of the chimes that play over the second logo which you see when a disc is loaded, rather than a separate sample. Judging ...


13

Traditional BIOS setup interfaces had much simpler user interfaces than you're assuming. They were also written in assembly which allowed for much more compact code than you would think based on the size of applications today. They didn't have "full blown TUIs", most used a simple form interface. On the other hand operating systems like GEOS for the ...


13

The reference for this is DEW Associates’ pages on the topic. Multiple barriers have existed in the history of hard drives on PC compatibles. The main ones are the barriers at 528 MB (504 MiB) barrier, 2.1 GB, 4.2 GB and 8.4 GB. They stem from various limitations in the interfaces used to talk to hard drives. Originally, these interfaces were based on an ...


13

When configured to use upper memory (DOS=UMB) or high memory (DOS=HIGH) or both, the DOS “kernel” doesn’t find that memory itself; it relies on the services of a memory manager such as HIMEM.SYS, and the APIs it provides. The memory manager determines what memory is available using a variety of techniques. However, what you’re trying to do doesn’t require ...


12

Even just restricting discussion to the first season, before the same people apparently not only clone the PC but also create (facsimiles of) Sierra Online, McAffee, Netscape and Yahoo, she's not based on anybody real. In real life the source code for the IBM BIOS was printed in the back of the manual. There was no Gordon inexplicably hand transcribing the ...


12

As indicated by e.g. this description of the Phoenix BIOS, possible NMI sources are Memory parity errors x87 Coprocessor errors I/O card NMI (for whatever reason the I/O card decides to invoke it) DMA bus time-out errors (AT only) Additionally, the Programmable Interrupt Timer (PIT; 8253 or 8254) could generate an NMI using a watchdog and possibly also on ...


11

Phoenix Technologies developed its ROM BIOS from IBM's using a cleanroom approach: To develop its ROM BIOS software, Phoenix claims in its press release that it used a process that would assure that none of IBM's original code was wittingly duplicated. One group at Phoenix examined the BIOS software documented in IBM's Technical Reference Manual, ...


10

On the IBM PCJr, the NMI was used by the keyboard device to signal the CPU. (Source: “The Peter Norton Programmer’s Guide to the IBM PC”, chapter 3, under “Changing Interrupt Vectors” while discussing CLI)


8

Was it easier than I'm imagining? Yes, I believe it was. Did these early programmers just use a library similar to ncurses but for BIOS programming? How were these text interfaces engineered? To understand this, it's important to keep in mind two things. The IBM PC of the time was a very simple architecture by today's standards. You can do a lot of ...


8

In all the BIOS setups I was dealing with that have similarly 47 drives to chose from the first or the last one was editable directly in BIOS SETUP for manual settings. Sometimes the manual settings was done in different menu entry (near formatting utility ... but beware do not accidentally format IDE !!!). IIRC DOS uses BIOS routines for HDD access so if ...


8

When IBM published this source code, it was to make it easier for other companies to make peripherals. They wanted there to be a lot of cards to could be slotted into the PC and just work. Having all these cards available would increase the marked for the PC itself.


7

Writing single pixels is a non-starter if you want any performance, even if you don't go through the overhead of a BIOS call for each pixel. Graphics libraries in and around the EGA era were based on drawing entire lines at a time, curved lines that were segments of axis-parallel elipses, and things like filled rectangles and circles. The interior of the ...


6

Assembler is the way ... You can do a lot of stuff in 4 KBytes just google 4K demoscene ... I once created a 3D space ship sim game under 4K (gfx included) with 3D polygonal SW rendering with textures. Text mode (VGA mode 3) menus are really just few Bytes of code look at his: What is the best way to move an object on the screen? Printing of text is ...


6

If you’re using BIOS functions to read from the keyboard in your game, the quickest way to clear the buffer is to make its tail equal to its head: read the value at 0x0041A and write it to 0x0041C: proc clearkeyboardbuffer ; AX is clobbered push ds mov ax, 0040h mov ds, ax mov ax, [001Ah] mov [001Ch], ax pop ds ret endp ...


6

The BIOS code and interface were developed on a processor that only had 16-bit real mode addressing, which means it is not compatible with other addressing modes and code will run only if CPU is in a mode that is compatible with real mode so on later CPUs it could be also in virtual 8086 mode. The addressing modes and default operand lengths differ in other ...


6

But the question is, how did DOS know what portions of the UMA where available? DOS itself doesn't touch neither High-Mem nor UMB without being ordered to do so. And even then it needs a driver capturing and providing these memory areas. Usually this is HIGHMEM.SYS If so, what if wanted to write a TSR that would monitor BIOS interrupts even before DOS ...


6

The previous answer talks about various issues that may arise when attempting to run an older OS on a modern system, but doesn’t really focus on the questions asked. When a multicore CPU powers on, a single core is activated. The BIOS typically has a configuration option to control how many additional cores should be activated. If this BIOS setting is set ...


6

The original IBM 5150 Personal Computer (the IBM PC) connected the Non-Maskable Interrupt to the I/O Check signal, which could be driven by an add-in card, or by the on-board memory. If the systems memory detected a parity error, it would trigger a NMI, and the systems software would halt the machine and display an on screen error. You can read about this in ...


5

Preface: I assume the question to be deleted or moved soon, as this is not in any way RC related. After all, the issue in question is not the classic OS, but workings modern hard- and software. Since every multi core CPU starts up in single core mode, it is basically possible to use any old, single core OS. As long as the CPU is compatible - which no longer ...


5

MS-DOS 6.22 only uses CHS (cylinder/head/sector) addressing to access disks, so it doesn't really matter if the BIOS supports LBA addressing. The CHS BIOS interfaces MS-DOS uses to access disk support drives up to just under 8GB, so this also the about limit for the MS-DOS. (A bug in MS-DOS means that it crashes if a drive has 256 heads, so it's limit is a ...


5

I can assure you it was not altruism! In fact, it made it darn hard to copy legally (see Eagle Computer) and get away with it. Phoenix had to prove that none of the people who wrote the code EVER read the IBM published code. And I can tell you that nearly all of us in that era had. So while it seems simple, it was a great way to freeze the competition. They ...


4

The key word is "modes" A 64-bit x86 processor can be switched into 16, 32 and 64-bit modes (which is an over-simplification, there are more than that), but code written for one mode won't run correctly in a different mode. The reasons for this are many and varied, but the main issue is that the instructions in the code mean slightly different things in ...


4

Depending on your skill level and the hardware you have access to, there are a few possible approaches I can think of: you could read the code for the various BIOSs involved and try to figure out the incompatibility that way you could use an in-circuit emulator to debug the problem you could use a bus sniffer such as reenigne’s to trace the system booting ...


Only top voted, non community-wiki answers of a minimum length are eligible