tag:blogger.com,1999:blog-6337519173866329217.post81938504490469180..comments2021-06-18T07:33:11.857-07:00Comments on JUST 8 BITS, WHAT CAN YOU DO WITH?: Doing it in less than Bill Gates. Loading Microsoft 4K BASIC on ALTAIR 8800 with PapertapeJosh Bensadonhttp://www.blogger.com/profile/06079275070676764619noreply@blogger.comBlogger29125tag:blogger.com,1999:blog-6337519173866329217.post-84970706362561716692021-06-18T07:33:11.857-07:002021-06-18T07:33:11.857-07:00I used an ASR 33 to program on my first job. OMG w...I used an ASR 33 to program on my first job. OMG were they loud.Claudius2khttps://www.blogger.com/profile/10903904398370115998noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-8187171371994846412020-08-16T12:42:34.491-07:002020-08-16T12:42:34.491-07:00This is while he's still new to the machine. B...This is while he's still new to the machine. Before we get much deeper into the story I'm going to have him build a bootstrap ROM board to eliminate the paper tape. Just want to have one description of the full process at the beginning for old times' sake. Let the young whippersnappers know how we walked five miles uphill through the snow to play Star Trek!Eric H Bowenhttps://www.blogger.com/profile/03034050098271547589noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-82719317330803463462020-08-16T02:44:11.935-07:002020-08-16T02:44:11.935-07:00Then your novel geek would have to enter the first...Then your novel geek would have to enter the first stage boot for reading a paper tape via front panel. The tape he read in would be the MBL loader, which can read BASIC from the cassette port then.<br />The problem with that is that no one really did this. Geeks make machines easier to use, not more complicated ;-) So in reality they put the MBL loader in ROM, to avoid the need for entering the first stage and skipping the second stage boot, to make the load happen faster. Your story is not very convincing for anyone who actually used the machines.Udo Munkhttps://www.blogger.com/profile/17813936095654578087noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-84960827480557074952020-08-15T16:14:33.287-07:002020-08-15T16:14:33.287-07:00Thanks. For story purposes, though, I'd prefer...Thanks. For story purposes, though, I'd prefer to proceed as I stated above: First, enter a Teletype bootloader through the front panel; second, enter a cassette interface loader with the paper tape reader; finally, load BASIC and then Star Trek from cassette and then play the game from the Teletype. How can I describe this as correctly as possible?<br /><br />Of course, if that is the wrong sequence then let me know; I'd rather be correct than dramatic (at least here!).Eric H Bowenhttps://www.blogger.com/profile/03034050098271547589noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-71341917994506462932020-08-15T14:32:02.292-07:002020-08-15T14:32:02.292-07:00One would enter the boot loader for the ACR casset...One would enter the boot loader for the ACR cassette interface to load BASIC from a cassette. Source for the loader:<br />https://www.autometer.de/unix4fun/z80pack/ftp/altair/mits-tapes/<br />Udo Munkhttps://www.blogger.com/profile/17813936095654578087noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-1971414328532618992020-08-15T12:56:57.132-07:002020-08-15T12:56:57.132-07:00I'm writing a novel set in 1977, and a front-p...I'm writing a novel set in 1977, and a front-panel Altair 8800b has a significant part in it. The protagonist is a young (9th grade) geek showing off his new toy to his biology lab partner. (Yes, this is exactly when I was in high school!)<br /><br />I'm wanting to document, as much as possible without boring readers, the process of booting up an 8800b and loading BASIC in order to play David Ahl's version of "Star Trek" on a Teletype ASR 33 (entering the initial boot program by front panel, then loading a cassette interface driver with paper tape, and then loading BASIC and the game from cassette). Would anyone be able to point me to accurate and detailed information? ("This is for posterity, so be honest" [/Count Rugen])Eric H Bowenhttps://www.blogger.com/profile/03034050098271547589noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-54170749969682121452018-10-25T09:04:14.705-07:002018-10-25T09:04:14.705-07:000000 ORG 0
... 0000 ORG 0<br /> ;<br /> ; SIO REV 1 LOADER FOR ALTAIR BASIC<br /> ;<br /> ; ** FOR VERSIONS < 4.0 SET SENSE SWITCHES A11, A10 ON **<br /> ; ** FOR VERSIONS >= 4.0 SET SENSE SWITCHES OFF **<br /> ;<br /> ; H = MSB OF LOAD ADDRESS<br /> ; L = LSB OF LOAD ADDRESS = LENGTH OF LOADER = LEADER BYTE<br /> <br /> ; LXI H,00FAEH ;4K BASIC V3.2<br /> 0000 21AE1F LXI H,01FAEH ;8K BASIC V3.2<br /> ; LXI H,00FC2H ;4K BASIC V4.0<br /> ; LXI H,01FC2H ;8K BASIC V4.0<br /> ; LXI H,03FC2H ;EXTENDED BASIC V4.0, V4.1<br /> ; LXI H,07EC2H ;EXTENDED DISK BASIC V5.0<br /> <br /> 0003 311200 LOOP: LXI SP,STACK ;INIT SP SO A RET JUMPS TO LOOP<br /> 0006 DB00 IN 00H ;GET SIO STATUS<br /> 0008 0F RRC ;NEW BYTE AVAILABLE?<br /> 0009 D8 RC ;NO (JUMPS BACK TO LOOP)<br /> 000A DB01 IN 01H ;GET THE BYTE<br /> 000C BD CMP L ;NEW BYTE = LEADER BYTE?<br /> 000D C8 RZ ;YES (JUMPS BACK TO LOOP)<br /> 000E 2D DCR L ;NOT LEADER, DECREMENT ADDRESS<br /> 000F 77 MOV M,A ;STORE THE BYTE (REVERSE ORDER)<br /> 0010 C0 RNZ ;LOOP UNTIL L = 0<br /> 0011 E9 PCHL ;JUMP TO CODE JUST DOWNLOADED<br /> <br /> 0012 0300 STACK: DW LOOP<br /> <br /> END<br />Udo Munkhttps://www.blogger.com/profile/17813936095654578087noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-27688988767386109052017-04-01T15:19:31.049-07:002017-04-01T15:19:31.049-07:00Yes, the famous Ferman's Last Theorem. Wiles&...Yes, the famous Ferman's Last Theorem. Wiles' proof was one of the greatest mathematical achievements of the past fifty years (not that I understand much of the proof).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-12449024240388011032017-03-29T15:09:51.485-07:002017-03-29T15:09:51.485-07:00I'm trying to go over what can be done with th...I'm trying to go over what can be done with that... I'm just not seeing anything that can store a program. Most instructions cause relative action (ie, shift, increment, add, etc), and you already pointed out they can't be of use. Time to move on to the next project for me!Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-31386531183032448572017-03-28T12:47:20.768-07:002017-03-28T12:47:20.768-07:00With this code, you get executed whatever is on th...With this code, you get executed whatever is on the tape:<br />0000: 21 00 00 LXI H, 0000<br />0003: DB 01 IN 01<br />0005: 77 MOV M,A<br />0006: E9 PCHL<br />0007<br />There is only very limited amount of instructions that you can use. It is pretty much useless.<br />There are other multiple variations giving you more choices. For example this is most complex one:<br />0000: 11 00 00 LXI D, 0000<br />0003: 4F MOV C,A<br />0004: DB 01 IN 01<br />0006: 12 STAX D<br />0007: 79 MOV A,C<br />0008: C3 00 00 JMP 0000<br />000B<br />You can use much more instructions, you can even use A register for AND + OR math and PCHL to jump (or RET can jump to C9 + conditional returs). You can, with varying complexity, get over 80 unique values to any of HLBA register. Whether those values are useful, i do not know. It is already 11 bytes and it requires tape to be run first. Which might not even be worth trying.<br />Remember, specified instruction gets executed many times, you can't use addition and similar.Anonymoushttps://www.blogger.com/profile/13863481951404863614noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-73481887580951361552017-03-28T10:24:38.113-07:002017-03-28T10:24:38.113-07:00Yes, I double checked the idea with my old notes, ...Yes, I double checked the idea with my old notes, it was something I meant to get back to but there were other hurdles.<br /><br />You are correct to assume IN 01 will always return same byte. IN 01, will read the RX Register of the UART. This register will be undefined upon power up. It will then be written to by the byte received by the UART's shift register. This write happens regardless of whether or not the register was read. ie. The UART doesn't hold on to it for safe keeping, if you miss it, then it's gone. Can the papertape itself be used to provide the next instruction(s) for the bootloader??? Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-53838599225575937942017-03-28T09:11:46.135-07:002017-03-28T09:11:46.135-07:00That's nice. I wonder if it works well.
I migh...That's nice. I wonder if it works well.<br />I might have something else. However, i have to make one rule. You have to start tape first and then run bootstrap.<br />Can i assume that IN 01 will always return same byte, if you run tape first (with that byte repeating)?Anonymoushttps://www.blogger.com/profile/13863481951404863614noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-68131671483341528582017-03-27T18:04:42.130-07:002017-03-27T18:04:42.130-07:00LoL, Yes, I remember this guy... I totally forgot ...LoL, Yes, I remember this guy... I totally forgot his name. I'm not good with remembering names, but do remember the skepticism.Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-80917160456154477122017-03-27T13:54:41.099-07:002017-03-27T13:54:41.099-07:00Oh Josua Tree,
Check out the famous meatball &qu...Oh Josua Tree, <br /><br />Check out the famous meatball "Pierre de Fermat" he was a mathemagician who scrawed "that the equation an + bn = cn had no solutions in positive integers, if n is an integer greater than 2" in the margin of a book or on the wall of a truck stop (I forget which).Jubjubhttps://www.blogger.com/profile/06431101013048679955noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-43986763033308535292017-03-27T13:53:37.348-07:002017-03-27T13:53:37.348-07:00This comment has been removed by the author.Jubjubhttps://www.blogger.com/profile/06431101013048679955noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-72527596876678622162017-03-27T11:42:09.273-07:002017-03-27T11:42:09.273-07:00And right you are! That should make it in just 12...And right you are! That should make it in just 12 Bytes! Well done! I'll cut a new tape and try it out on my system.Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-59841048538828357062017-03-27T10:55:33.221-07:002017-03-27T10:55:33.221-07:00Look at repeating 01 00 case, it is easier.
There ...Look at repeating 01 00 case, it is easier.<br />There is obvious case that last instruction will be "C3 01 01 JMP 0101" since 00 is overwritten with 01.<br />However, if it happens to be 00 instead, you will get "C3 01 00 JMP 0001" (no change) and so bootstrap will continue. Next time it will overwrite 01 with 01. No change again and bootstrap will run once more. Last run is final run, because C3 will be replaced with 00, which is NOP opcode and that will break the loop.<br />If i understand correctly, there is 3 byte uncertainty which makes two different outcomes.Anonymoushttps://www.blogger.com/profile/13863481951404863614noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-43938277496842063312017-03-26T17:44:01.821-07:002017-03-26T17:44:01.821-07:00I don't quite see where you're going with ...I don't quite see where you're going with that. The problem with overwriting, is that you can't be sure which value will overwrite the jump target. To be sure, it will take more bytes.Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-6251145619337405282017-03-26T17:38:49.749-07:002017-03-26T17:38:49.749-07:00Brilliant! I would love to see that!
With hardwar...Brilliant! I would love to see that! <br />With hardware modifications it can be done in 9 bytes (but that requires specialized hardware).<br />It's basically this:<br />LD H,3<br />IN 1<br />LD (HL),A<br />DEC HL<br />JP 0002<br /><br />The special hardware would put the processor in a wait state until the data comes in. I have designed such hardware for my JAIR 8080 beta version, to interface a slow PIC chip. Of course, if hardware modifications are on the menu, then it can all be done through DMA, or even better by the use of Shadow ROM (something my later version of JAIR 8080 uses).<br /><br />But, to your 11 bytes, why can't your reply fit in this box if it's only talking about 11 bytes?<br /><br /><br /><br />Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-8248351680756704922017-03-26T13:54:04.091-07:002017-03-26T13:54:04.091-07:00Ah ok, i do not know ALTAIR hardware stuff. It sho...Ah ok, i do not know ALTAIR hardware stuff. It should be possible to overwrite JMP instruction itself then.<br />Like this (bytes on tape):<br />AE ** third stage mark **<br />21 01 00 LXI H, 0001 ; it will jump to 0101 before writing "JMP 0121"<br />C3 00 01 JMP 0100<br />Or repeating 00 01 should work too, JMP becames NOP.Anonymoushttps://www.blogger.com/profile/13863481951404863614noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-12014476717020912592017-03-25T18:50:30.188-07:002017-03-25T18:50:30.188-07:00It is impossible to write a bootloader that takes ...It is impossible to write a bootloader that takes less than 11 bytes. I have discovered a truly marvelous proof of this, which this reply textbox is too narrow to contain. -- Pierre de FermatUnknownhttps://www.blogger.com/profile/15433870936756639251noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-24468598662730204402017-03-25T09:06:46.506-07:002017-03-25T09:06:46.506-07:00I could shave one more byte off my bootstrap loade...I could shave one more byte off my bootstrap loader by only loading H with 03, but then it would add 300 bytes of filler to the papertape. It would still be "easy to use" but take even longer to load the papertape at the show. There's only so much patience one can endure! Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-90937190467240386242017-03-25T08:47:50.420-07:002017-03-25T08:47:50.420-07:00kgsws, I thought of doing this, but if you look a...kgsws, I thought of doing this, but if you look at how the jump gets overwritten, you cannot guarantee bootstrap 100% of the time. The modified jump can either be 0103 or 0203, depends if the byte at the initialized HL is by chance equal to the leader byte or the random/last byte in the UART (depending if you start the papertape before or after the ALTAIR). I spent many hours trying to figure out how to guarantee the load location, but it cannot be done without adding more bytes to the bootstrap loader or preloading that one memory location (which adds more switch tasks than just 1 bytes). But it is a brilliant use of overlapping the code! Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-85506028823174721392017-03-25T07:45:28.233-07:002017-03-25T07:45:28.233-07:00This comment has been removed by the author.Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.comtag:blogger.com,1999:blog-6337519173866329217.post-69087879865304014042017-03-25T07:34:23.216-07:002017-03-25T07:34:23.216-07:00Ian, Thanks, but I don't think we can make th...Ian, Thanks, but I don't think we can make the assumption HL is zero. That might work fine on an emulator. I've always thought a good emulator should randomize the register and RAM contents. PS. The data sheet clearly indicates all registers and flags are undefined.Josh Bensadonhttps://www.blogger.com/profile/06079275070676764619noreply@blogger.com