1. A contest...with a prize!
- Posted by Irv <irv at ELLIJAY.COM> Jun 01, 1998
- 799 views
With all the talk about the merits of various languages, assemblers, disassemblers, etc., I thought this might be of interest: my first ever computer program. It was used on a daily basis by several people for over a year at my place of employment. The first person who can tell me what it does will receive a luxurious, all expense p...hmmm. make that: Lovely Gift Certificate for some burger place; I'm on a limited budget. Bonus & Hint: If you accurately describe the platform it runs on, I will supersize that meal. -- BEGIN CODE (46h bytes) 3A3AF806F551F801F55164213A2A7A82513006 -- CODE ENDS BTW & FYI: this IS the language in which it was written! Rules: you are allowed to disassemble this code if you: 1.Have a disassembler for the [deleted] computer, and 2.send me a copy (pleeeze!) Irv PS: sorry about the lack of comments :P
2. Re: A contest...with a prize!
- Posted by Jacques Deschenes <desja at GLOBETROTTER.QC.CA> Jun 03, 1998
- 741 views
At 14:26 01-06-98 -0400, you wrote: >With all the talk about the merits of various languages, >assemblers, disassemblers, etc., I thought this might be >of interest: my first ever computer program. >It was used on a daily basis by several people for over >a year at my place of employment. > >The first person who can tell me what it does will receive >a luxurious, all expense p...hmmm. make that: >Lovely Gift Certificate for some burger place; >I'm on a limited budget. > >Bonus & Hint: If you accurately describe the platform it runs on, >I will supersize that meal. > >-- BEGIN CODE (46h bytes) >3A3AF806F551F801F55164213A2A7A82513006 >-- CODE ENDS > >BTW & FYI: this IS the language in which it was written! >Rules: you are allowed to disassemble this code if you: >1.Have a disassembler for the [deleted] computer, and >2.send me a copy (pleeeze!) > >Irv > >PS: sorry about the lack of comments :P > Well Irv beleive it or not I recognised those HEX bytes at first glance. I spent so many hours in 1978 programming a CDP1802 machine on a Hexadecimal keypad and only LED for display (not even and hex display just binary code) 00 38 SKP ; skip next byte 01 00 ; data byte 02 F8 01 LDI 01 ; load immediate register D with 01 04 A1 PLO R1 ; put register D in low byte of R1 05 E1 SEX 1 ; set register X with 1 06 64 OUT4 ; out to device 4 M(R(X)) -> BUS 07 21 DEC R1 ; decrement R1 08 F0 LDX ; load register D via register X 09 A2 PLO R2 ; put register D in low byte of register 2 0A 6C INP4 ; input from device 4 (data send to D and M(R(X)) 0B FA 0F ANI 0F ; AND immediate D with 0F 0D FB 0F XRI 0F ; XOR immediate D with 0F 0F C6 LSNZ ; long skip (skip 2 bytes) if D not 0 10 7B SEQ ; set Q output line. (this is a single bit output on CDP1802) 11 38 NBR ; skip next byte 12 7A REQ ; reset Q line 13 F0 LDX ; load register D via register X 14 FA 0F ANI 0F ; AND immediate D with 0F 16 FD 09 SDI 09 ; substract D immediate i.e D-09 18 3B 23 BNF 23 ; short branch to 23 if DF = 0 1A F0 LDX ; load register D via register X 1B FA F0 ANI F0 ; AND immediate D with F0 1D FD 90 SDI 90 ; substract D immediate i.e. D-90 1F 3B 23 BNF 23 ; short branch to 23 if DF = 0 21 30 27 BR 27 ; short branch to 27 23 82 GLO R2 ; get low byte of register 2 in D 24 51 STR R1 ; store D in memory via register 1 25 64 OUT4 ; output M(R(X)) to device 4 26 21 DEC R1 ; decrement R1 27 3F 06 BN4 ; short branch to 06 if EF4 = 0 (EF4 is an input line of CDP1802) 29 7B SETQ ; set Q line 2A F8 90 LDI 90 ; load D immmediate with 90 2C B3 PHI R3 ; put D in hi byte of register 3 2D 23 DEC R3 ; decrement register 3 2E 93 GHI R3 ; get hi byte of R3 in D 2F 3A 2D BNZ ; short branch to 2D if D not 0 31 F0 LDX ; load D with containt of memory pointed by X i.e. D = (R(X)) 32 FA 0F ANI 0F ; AND immediate D with 0F 34 3A 3A BNZ 3A ; short branch to 3A if D not 0 36 F8 06 LDI 06 ; load D with 06 38 F5 SD ; subtract D from memory i.e. M(R(X)) - D -> D, DF 39 51 STR R1 ; store D in memory via register 1 D->M(R(N)) 3A F8 01 LDI 01 ; load D with 01 3C F5 SD ; M(R(X)) - D -> D, DF 3D 51 STR R1 ; D -> M(R(N)) 3E 64 OUT4 ; output to device 4 via R(X) i.e. M(R(X) -> BUS 3F 21 DEC R1 ; decrement register 1 40 3A 2A BNZ 2A ; branch to 2A if D not 0 42 7A REQ ; reset line Q 43 82 GLO R2 ; low byte of R2 in D i.e. R2.0 -> D 44 51 STR R1 ; D -> M(R(1)) 45 30 06 BR 06 ; branch to 06 (code deassembled by hand) This is code for RCA CDP1802 microprocessor. The computer was probably a COSMAC ELF Popularized by "Popular electronics" in 1977 (or 1978). I don't understand yet what is does. (what device was connected to output 4, line Q and input line EF4 ? ) On my machine there was a LED on the Q line so codes 7B and 7A was flashing de LED. I connected a speaker on that line too and produce sound effects with it. I even code a program to play tunes. Regards, Jacques Deschenes Baie-Comeau, Quebec Canada desja at globetrotter.qc.ca
3. Re: A contest...with a prize!
- Posted by mountains at MINDSPRING.COM Jun 03, 1998
- 785 views
At 12:04 AM 6/3/98 -0400, Jacques Deschenes wrote: >This is code for RCA CDP1802 microprocessor. The computer was probably a COSMAC ELF >Popularized by "Popular electronics" in 1977 (or 1978). >I don't understand yet what is does. (what device was connected to output 4, line Q >and input line EF4 ? ) >On my machine there was a LED on the Q line so codes 7B and 7A was flashing de LED. >I connected a speaker on that line too and produce sound effects with it. >I even code a program to play tunes. >--- Hoo! I didn't expect a reply so quickly. You are correct (enough to win the prize - where shall I send the coupons?) I wondered if there was a "signature" in the machine code that would be recognizable, and sure enough, there was - strange how some things stick in your memory, even for 20 years. This ran on an ELFII, which had a 2 hex displays connected to output port 4 (64), a hex keypad, and an Input key connected to input 4. There was also a relay driven off the Q line, which supplied 110v ac to a device. If you're interested in a perfect, working 1802 computer in hirez graphics: Quote: "Compatible with Windows 3.1, 95, and NT, as well as WABI (Sun), WINE (X-windows), SoftWindows (Mac), and other Windows emulators. (And if you don't think it's ironic to run a simulation of a 14-year-old microprocessor under an emulator of an 8 year old operating system running on an expensive new personal computer, then your sense of irony is obviously in need of a checkup! " >--- >--- Regards, Irv
4. Re: A contest...with a prize!
- Posted by JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> Jun 03, 1998
- 804 views
Irv: Could you please check the U.R.L?. I cannot reach it... Thanks. Jesus. >>--- >>---
5. Re: A contest...with a prize!
- Posted by David Cuny <dcuny at LANSET.COM> Jun 03, 1998
- 790 views
Jacques Deschenes wrote: >Well Irv beleive it or not I recognised those HEX bytes at first glance. >I spent so many hours in 1978 programming a CDP1802 machine on >a Hexadecimal keypad and only LED for display (not even and hex >display just binary code) There's a "Real Programmers" joke in here somewhere... I'm impressed, and a bit frightened. -- David Cuny
6. Re: A contest...with a prize!
- Posted by Joe Phillips <bubba at TXWES.EDU> Jun 03, 1998
- 757 views
I, too, had one of those 'euphoric' experiences when I read your response! It was a bright, yet dull sensation that started in the palm of my hand and proceeded down through..... No, wait, that was when I was healed with my hand touching a television screen, Anyway. I have never experienced that environment, but I feel a sort-of kinship. Although I did not touch my first computer until 1982. IBM Series I. As long as I am waxing philosophical, this is a great chance for all of the younger programmers to acknowledge the wealth of experience they have available to them on this list. As a beginner, I would have relished the chance to read some of these discussions on logic, design, etc. I think that is why many of you are so patient and level headed with your responses to the 'simple' or 'intro' questions. Let's NOT separate the lists....... <******** ORIGINAL MESSAGE FOLLOWS *********> Well Irv beleive it or not I recognised those HEX bytes at first glance. I spent so many hours in 1978 programming a CDP1802 machine on a Hexadecimal keypad and only LED for display (not even and hex display just binary code) 00 38 SKP ; skip next byte 01 00 ; data byte 02 F8 01 LDI 01 ; load immediate register D with 01 04 A1 PLO R1 ; put register D in low byte of R1 05 E1 SEX 1 ; set register X with 1 06 64 OUT4 ; out to device 4 M(R(X)) -> BUS 07 21 DEC R1 ; decrement R1 08 F0 LDX ; load register D via register X 09 A2 PLO R2 ; put register D in low byte of register 2 0A 6C INP4 ; input from device 4 (data send to D and M(R(X)) 0B FA 0F ANI 0F ; AND immediate D with 0F 0D FB 0F XRI 0F ; XOR immediate D with 0F 0F C6 LSNZ ; long skip (skip 2 bytes) if D not 0 10 7B SEQ ; set Q output line. (this is a single bit output on CDP1802) 11 38 NBR ; skip next byte 12 7A REQ ; reset Q line 13 F0 LDX ; load register D via register X 14 FA 0F ANI 0F ; AND immediate D with 0F 16 FD 09 SDI 09 ; substract D immediate i.e D-09 18 3B 23 BNF 23 ; short branch to 23 if DF = 0 1A F0 LDX ; load register D via register X 1B FA F0 ANI F0 ; AND immediate D with F0 1D FD 90 SDI 90 ; substract D immediate i.e. D-90 1F 3B 23 BNF 23 ; short branch to 23 if DF = 0 21 30 27 BR 27 ; short branch to 27 23 82 GLO R2 ; get low byte of register 2 in D 24 51 STR R1 ; store D in memory via register 1 25 64 OUT4 ; output M(R(X)) to device 4 26 21 DEC R1 ; decrement R1 27 3F 06 BN4 ; short branch to 06 if EF4 = 0 (EF4 is an input line of CDP1802) 29 7B SETQ ; set Q line 2A F8 90 LDI 90 ; load D immmediate with 90 2C B3 PHI R3 ; put D in hi byte of register 3 2D 23 DEC R3 ; decrement register 3 2E 93 GHI R3 ; get hi byte of R3 in D 2F 3A 2D BNZ ; short branch to 2D if D not 0 31 F0 LDX ; load D with containt of memory pointed by X i.e. D = (R(X)) 32 FA 0F ANI 0F ; AND immediate D with 0F 34 3A 3A BNZ 3A ; short branch to 3A if D not 0 36 F8 06 LDI 06 ; load D with 06 38 F5 SD ; subtract D from memory i.e. M(R(X)) - D -> D, DF 39 51 STR R1 ; store D in memory via register 1 D->M(R(N)) 3A F8 01 LDI 01 ; load D with 01 3C F5 SD ; M(R(X)) - D -> D, DF 3D 51 STR R1 ; D -> M(R(N)) 3E 64 OUT4 ; output to device 4 via R(X) i.e. M(R(X) -> BUS 3F 21 DEC R1 ; decrement register 1 40 3A 2A BNZ 2A ; branch to 2A if D not 0 42 7A REQ ; reset line Q 43 82 GLO R2 ; low byte of R2 in D i.e. R2.0 -> D 44 51 STR R1 ; D -> M(R(1)) 45 30 06 BR 06 ; branch to 06 (code deassembled by hand) This is code for RCA CDP1802 microprocessor. The computer was probably a COSMAC ELF Popularized by "Popular electronics" in 1977 (or 1978). I don't understand yet what is does. (what device was connected to output 4, line Q and input line EF4 ? ) On my machine there was a LED on the Q line so codes 7B and 7A was flashing de LED. I connected a speaker on that line too and produce sound effects with it. I even code a program to play tunes. Regards, Jacques Deschenes Baie-Comeau, Quebec Canada desja at globetrotter.qc.ca <*************** END OF ORIGINAL MESSAGE ************> Joe Phillips, Assistant Director Information Technology Services Texas Wesleyan University 817-531-4284
7. Re: A contest...with a prize!
- Posted by Cameron Kaiser <spectre at WWW2.BUOY.COM> Jun 03, 1998
- 742 views
> Anyway. I have never experienced that environment, but I feel a sort-of > kinship. Although I did not touch my first computer until 1982. IBM Series I. I inherited a Commodore KIM-1, a bit more advanced than the COSMAC. Fun device -- people had even come up with a MicroChess for it, and various little games. You could even hook it up to a TTY and talk to it with a "regular" terminal. Alas, the only assembly I know well is 6502 assembly. Those were the days. -- Cameron Kaiser * spectre at sserv.com * http://www.sserv.com/ -- Visit the leading Internet starting point today! http://www.sserv.com/ --
8. Re: A contest...with a prize!
- Posted by Irv <irv at ELLIJAY.COM> Jun 03, 1998
- 728 views
At 02:06 PM 6/3/98 -0400, Cameron Kaiser wrote: >I inherited a Commodore KIM-1, a bit more advanced than the COSMAC. Fun >device -- people had even come up with a MicroChess for it, and various >little games. You could even hook it up to a TTY and talk to it with a >"regular" terminal. > >Alas, the only assembly I know well is 6502 assembly. Those were the days. > Hmm.. I finally had to toss the Teletype - it was taking up space I needed for other things. Besides, every time it was turned on, lights dimmed all over the neighborhood. I still have a KIM-1, along with a pile of software. Regards, Irv
9. Re: A contest...with a prize!
- Posted by Irv <irv at ELLIJAY.COM> Jun 03, 1998
- 753 views
At 10:00 AM 6/3/98 -0500, you wrote: >I spent so many hours in 1978 programming a CDP1802 >machine on a Hexadecimal >keypad and only LED for display (not even and hex display just >binary code) >Jacques Deschenes For those who don't know, the 1802 (RCA product) was a computer you could build with a soldering iron, some wire, and about $25 On the other hand, it was one of the few modern computers that you could easily out-compute with a pencil and paper...that was also the way you assembled programs for the thing. You generally had to make your program and data fit into 256 bytes. People learned a lot about programming, working under those constraints. Regards, Irv
10. Re: A contest...with a prize!
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Jun 03, 1998
- 731 views
- Last edited Jun 04, 1998
>On the other hand, it was one of the few modern computers that >you could easily out-compute with a pencil and paper...that was >also the way you assembled programs for the thing. You generally >had to make your program and data fit into 256 bytes. >People learned a lot about programming, working under those >constraints. Wow, where can you get those things? At school we have these bords where you can plug an input, do some action with it and then output something. Like, your input is generated by a pulse generator, it goes from 1 Volt to 5 Volt, within some time you set it to. Then you plug that input in a 'NOT' operator or an 'AND' operator and you can use LED's, A small beeper or a relay to output the result. You can input any type of input actually, also sensors. Pretty neat thing actually. We have to use it a lot. I consider that to be the base of programming. You let it make a decision based upon some input resulting in some output. The decision is split down into very small decisions, which you use to explain the computer the more complex decisions. What does that RCA thing do ? Ralf
11. Re: A contest...with a prize!
- Posted by Irv <irv at ELLIJAY.COM> Jun 03, 1998
- 748 views
At 08:55 PM 6/3/98 +0200, you wrote: > >Wow, where can you get those things? >What does that RCA thing do ? > >Ralf > The 1802/1805 chip is the heart of the Voyager, Viking and Galileo spacecraft. Why? Because it's built with silicon on sapphire, so it's fairly immune to radiation damage. Harris Semiconductor makes it now (used to be RCA) You don't have to buy the chip: here is a life-size *simulated* computer, free of charge: (a beautiful job with graphics, too) Regards, Irv
12. Re: A contest...with a prize!
- Posted by JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> Jun 03, 1998
- 761 views
- Last edited Jun 04, 1998
---------- > De: Irv <irv at ELLIJAY.COM> > Fecha: miércoles 3 de junio de 1998 22:39 > > The 1802/1805 chip is the heart of the Voyager, Viking and Galileo > spacecraft. Why? Because it's built with silicon on sapphire, > so it's fairly immune to radiation damage. It was chosen also because the extremely low power draining. I was using also one self-made ELF and I recall powering it from a dry battery for days. I moved after to the Motorola 6802, faster (but not better), and at that time there were better cross assemblers for the minicomputers in vogue. I keep my self made 6802 development system: 6 7-segment LEDs, one PIA, 1 2708 EPROM, 16 key keyboard, cassette loader... Was a luxury at that time... JesusC
13. Re: A contest...with a prize!
- Posted by Jacques Deschenes <desja at GLOBETROTTER.QC.CA> Jun 03, 1998
- 745 views
- Last edited Jun 04, 1998
At 01:05 03-06-98 -0700, you wrote: >Jacques Deschenes wrote: > >>Well Irv beleive it or not I recognised those HEX bytes at first glance. >>I spent so many hours in 1978 programming a CDP1802 machine on >>a Hexadecimal keypad and only LED for display (not even and hex >>display just binary code) > >There's a "Real Programmers" joke in here somewhere... > >I'm impressed, and a bit frightened. > >-- David Cuny > Don't worry David my words where a little exagerated. I first glance it was more an intuition that a certitude. Then I took the CDP1802 programmer manual in my book shelf an began to disasemble it. After a few bytes my intuition was confirmed. This computer was the first I bougth, I was young an very anthousiast. Like the first love one never forget those things. BTW Irv thanks for the offer but I not ungry for the moment. Regards, Jacques Deschenes Baie-Comeau, Quebec Canada desja at globetrotter.qc.ca
14. Re: A contest...with a prize!
- Posted by "Bonn Ortloff (\"LEVIATHAN\")" <ortlofffamily at WORLDNET.ATT.NET> Jun 03, 1998
- 742 views
- Last edited Jun 04, 1998
Joe Phillips wrote: > I, too, had one of those 'euphoric' experiences when I read your response! > It was a bright, yet dull sensation that started in the palm of my hand and > proceeded down through..... No, wait, that was when I was healed with my > hand touching a television screen, > > Anyway. I have never experienced that environment, but I feel a sort-of > kinship. Although I did not touch my first computer until 1982. IBM Series I. > > As long as I am waxing philosophical, this is a great chance for all of the > younger programmers to acknowledge the wealth of experience they have > available to them on this list. As a beginner, I would have relished the > chance to read some of these discussions on logic, design, etc. I think > that is why many of you are so patient and level headed with your responses > to the 'simple' or 'intro' questions. > > Let's NOT separate the lists....... > > <******** ORIGINAL MESSAGE FOLLOWS *********> > > Well Irv beleive it or not I recognised those HEX bytes at first glance. I > spent so many hours in 1978 programming a CDP1802 machine on a Hexadecimal > keypad and only > LED for display (not even and hex display just binary code) > > 00 38 SKP ; skip next byte > 01 00 ; data byte > 02 F8 01 LDI 01 ; load immediate register D with 01 > 04 A1 PLO R1 ; put register D in low byte of R1 > 05 E1 SEX 1 ; set register X with 1 > 06 64 OUT4 ; out to device 4 M(R(X)) -> BUS > 07 21 DEC R1 ; decrement R1 > 08 F0 LDX ; load register D via register X > 09 A2 PLO R2 ; put register D in low byte of register 2 > 0A 6C INP4 ; input from device 4 (data send to D and M(R(X)) > 0B FA 0F ANI 0F ; AND immediate D with 0F > 0D FB 0F XRI 0F ; XOR immediate D with 0F > 0F C6 LSNZ ; long skip (skip 2 bytes) if D not 0 > 10 7B SEQ ; set Q output line. (this is a single bit output on > CDP1802) > 11 38 NBR ; skip next byte > 12 7A REQ ; reset Q line > 13 F0 LDX ; load register D via register X > 14 FA 0F ANI 0F ; AND immediate D with 0F > 16 FD 09 SDI 09 ; substract D immediate i.e D-09 > 18 3B 23 BNF 23 ; short branch to 23 if DF = 0 > 1A F0 LDX ; load register D via register X > 1B FA F0 ANI F0 ; AND immediate D with F0 > 1D FD 90 SDI 90 ; substract D immediate i.e. D-90 > 1F 3B 23 BNF 23 ; short branch to 23 if DF = 0 > 21 30 27 BR 27 ; short branch to 27 > 23 82 GLO R2 ; get low byte of register 2 in D > 24 51 STR R1 ; store D in memory via register 1 > 25 64 OUT4 ; output M(R(X)) to device 4 > 26 21 DEC R1 ; decrement R1 > 27 3F 06 BN4 ; short branch to 06 if EF4 = 0 (EF4 is an input line of > CDP1802) > 29 7B SETQ ; set Q line > 2A F8 90 LDI 90 ; load D immmediate with 90 > 2C B3 PHI R3 ; put D in hi byte of register 3 > 2D 23 DEC R3 ; decrement register 3 > 2E 93 GHI R3 ; get hi byte of R3 in D > 2F 3A 2D BNZ ; short branch to 2D if D not 0 > 31 F0 LDX ; load D with containt of memory pointed by X i.e. D = > (R(X)) > 32 FA 0F ANI 0F ; AND immediate D with 0F > 34 3A 3A BNZ 3A ; short branch to 3A if D not 0 > 36 F8 06 LDI 06 ; load D with 06 > 38 F5 SD ; subtract D from memory i.e. M(R(X)) - D -> D, DF > 39 51 STR R1 ; store D in memory via register 1 D->M(R(N)) > 3A F8 01 LDI 01 ; load D with 01 > 3C F5 SD ; M(R(X)) - D -> D, DF > 3D 51 STR R1 ; D -> M(R(N)) > 3E 64 OUT4 ; output to device 4 via R(X) i.e. M(R(X) -> BUS > 3F 21 DEC R1 ; decrement register 1 > 40 3A 2A BNZ 2A ; branch to 2A if D not 0 > 42 7A REQ ; reset line Q > 43 82 GLO R2 ; low byte of R2 in D i.e. R2.0 -> D > 44 51 STR R1 ; D -> M(R(1)) > 45 30 06 BR 06 ; branch to 06 > > (code deassembled by hand) > > This is code for RCA CDP1802 microprocessor. The computer was probably a > COSMAC ELF > Popularized by "Popular electronics" in 1977 (or 1978). > I don't understand yet what is does. (what device was connected to output > 4, line Q > and input line EF4 ? ) > On my machine there was a LED on the Q line so codes 7B and 7A was flashing > de LED. > I connected a speaker on that line too and produce sound effects with it. > I even code a program to play tunes. > > Regards, > > Jacques Deschenes > Baie-Comeau, Quebec > Canada > desja at globetrotter.qc.ca > > <*************** END OF ORIGINAL MESSAGE ************> > > Joe Phillips, Assistant Director > Information Technology Services > Texas Wesleyan University 817-531-4284 Whoa!?! a cosmac ELF!?! jeez, I played with one when I was... five? (i'm 13 now, BTW...) blew out a diode checking for continuity... jeez, I never knew how to program one... I typed in a number (8 digit, HEX) and pressed [enter?] and nothing happend... I tried plugging it into the TV... WAH! never worked... BUT! this isn't the first time I tried programming... started on Color Computer 3 disk basic... taking programs out of Rainbow magazine, running it for errors, editing the errors, and running it again. (3rd draft!) editing errors, running again. and then, it ran.... too bad I never remember it... Oh boy, I'm turning out to be like my dad! :) Thanx! - "LEVIATHAN"