Ensign Cthulhu Posted December 22, 2024 Posted December 22, 2024 So... I have been doing a bit of retro programming here and there since last Christmas, and these last couple of days have seen me minding the fort while Little Miss Cthulhu performs in The Nutcracker in a neighbouring town (she was a gingerbead man this year). So I've been finished my Warships playing relatively early and had time to fool around with a Commodore 64 emulator in a reasonable facsimile of the old case and keyboard. Specifically I've been dabbling in a machine language monitor and short eight-bit machine language programs. Start address for my purposes is $C000, but it's relocatable in case the monitor loads to that spot. LDX #$00 LDA #$93 JSR $FFD2 LDA $0000,X *** STA $0400,X INX CPX #$FF BNE (***) (this address here; the monitor calculates the back-jump). RTS The next step will be to modify it to look for a couple of memory locations that I can poke values into from BASIC before making the SYS call, so that I can pull any memory page I want on demand. I think I know what to do. You'll hear from me in due course as to whether that works! Bonus challenge for other 6502/6510 assembly language programmers - can you identify what it does, and why I went with absolute addressing in line 4? 2
Efros Posted December 22, 2024 Posted December 22, 2024 I wrote a data acquisition section of a program I wrote for my Master's thesis in 6502 assembler, basically it talked to a custom built (guilty) interface with a photon counter. It grabbed the numbers and stored them in an array that the main program, written in zbasic, could use for the graphical display of atomic fluorescence peaks. Prior to this the experimenter would sit in front of the photon counter and copy down a number every second or so. As to your little routine above, I think you've got an incremental loop and you're plotting things on the screen ($FFD2 on the C64 rings a bell), but it's been 40 years since I looked at assembler. 2
Admiral_Karasu Posted December 22, 2024 Posted December 22, 2024 I just played the games... https://www.youtube.com/watch?v=3iV9qtKCwZU 1
Efros Posted December 22, 2024 Posted December 22, 2024 (edited) I was a Sinclair man, ZX80, 81 and finally a spectrum. I did buy an Amstrad CPC6128 later and that was based on some Sinclair designs I think. The ZX80 came as a kit, with a mindblowing 1k of ram, for those faint of heart or lacking in soldering skills you could pay twenty pounds (about 50 USD in 1980) more for a fully assembled version. All were bought for gaming/programming/tinkering, apart from the 6128. It was bought to avoid typing costs for my Master's thesis and also so that I could earn some extra dosh by typing other student's theses. It was a CP/M computer and the word processor was WordStar, a decidedly non WYSIWYG WP, however, being markup based it was ideal for scientific/technical documentation. It paid for itself fairly quickly, my typing services were highly sought after in the department as I also offered editing/advice on phrasing and content. My career as a typist come editor was short lived as slowly people started picking up the skills themselves, not sad TBH, typing other people's work is a little bit boring. Shortly after I built my first IBM compatible PC and that was the end of any non IBM-PC machines for me. Edited December 22, 2024 by Efros 3
Admiral_Karasu Posted December 22, 2024 Posted December 22, 2024 I don't know if it comes as much of a surprise if I say that I'm usually a bit behind my times... (like sporting muttonchops still in the early 2000s kind of guy...), but right in the early 90s I still thought it advisable to buy and electric IBM typewriter. One of those ball type things you could change for different fonts (like with the daisy wheel typewriters and printers too, if I remember correctly). I did also around that time buy an Epson LQ-400 dot matrix printer which, I think, still worked under Win95, but no longer under Win7. 4
Justin_Simpleton Posted December 22, 2024 Posted December 22, 2024 My first computer was an Osborne 1. It came with GBasic, Supercalc, Wordstar, and other software. I had Fortran running on it. I hooked up a modem to it and downloaded a copy of Business Commerce Daily that took 24 hours to download. This had the Z80 processor and the operating system was CP/M. It tended to overheat when ambient temperatures were above 95 F because there was no cooling fan (though available as an option). I was a subscribed member of FOG (first Osborne group). Ah, the good ole days. 4
Justin_Simpleton Posted December 22, 2024 Posted December 22, 2024 5 minutes ago, Admiral_Karasu said: I did also around that time buy an Epson LQ-400 dot matrix printer which, I think, still worked under Win95, but no longer under Win7. Win7 messed up a lot of legacy devices and software because they changed a number of DLLs which made the device drivers stop working. It also wouldn't support Visual Studio 6 programming software. 3
Snargfargle Posted December 22, 2024 Posted December 22, 2024 (edited) As stated above, its been 40 years since I had a Commodore 64 and wrote routines in assembly to call from Basic programs using RUN. Mostly, I did things like clear the screen, which was a slow process in Basic but fast in assembly. I couldn't have begun to have remembered all of this but AI is now pretty good at writing code. .org $0801 ; Start of the BASIC program, used by C64 for loading .byte $9e, $32, $30, $30, $30, $32, $00 ; BASIC header for running the machine code start: ldx #$00 ; Set X register to 0 (start of screen memory) clear_screen: lda #$20 ; Load the space character (ASCII value 0x20) sta $0400,x ; Store the space at the current screen memory address inx ; Increment X register cpx #$00ff ; Check if we have cleared all 1024 bytes (screen size) bne clear_screen ; If not, loop again rts ; Return from subroutine (end of program) Edited December 22, 2024 by Snargfargle 3
Ensign Cthulhu Posted December 22, 2024 Author Posted December 22, 2024 (edited) 7 minutes ago, Snargfargle said: As stated above, its been 40 years since I had a Commodore 64 and wrote routines in assembly to call from Basic programs using RUN. Mostly, I did things like clear the screen, which was a slow process in Basic but fast in assembly. I couldn't have begun to have remembered all of this but AI is now pretty good at writing code. .org $0801 ; Start of the BASIC program, used by C64 for loading .byte $9e, $32, $30, $30, $30, $32, $00 ; BASIC header for running the machine code start: ldx #$00 ; Set X register to 0 (start of screen memory) clear_screen: lda #$20 ; Load the space character (ASCII value 0x20) sta $0400,x ; Store the space at the current screen memory address inx ; Increment X register cpx #$00ff ; Check if we have cleared all 1024 bytes (screen size) bne clear_screen ; If not, loop again rts ; Return from subroutine (end of program) LDA #$93 JSR $FFD2 ...prints the Clear-screen ASCII (and leaves "ready" blinking up the top). Edited December 22, 2024 by Ensign Cthulhu
Snargfargle Posted December 22, 2024 Posted December 22, 2024 I don't think I ever heard of that easy way to clear the screen. However, I really didn't have any resource material either, just a roommate who knew a bit of assembly language and whatever computer magazine happened to draw my interest that month. I suppose I could have found the material at the library but it really never occurred to me to do so. I had too much other reading to do at the library to spend time researching a hobby. This was back before computerized databases were a thing so I had to spend hours every day pouring through scientific journals and reading abstracts in order to collect the articles needed for my research. What took me months to accomplish in the early 80s can be accomplished in a few seconds now. 1 1
Efros Posted December 22, 2024 Posted December 22, 2024 Same here, finished my BSc in 1981, MSc and PhD, '86 and '90 respectively, I was working while doing both of these, hence the large time intervals. Even in 1990 online resources were relatively rare and subject to phone line speed downloads. 2
Asym Posted December 22, 2024 Posted December 22, 2024 Oh GoD, IBM and Honeywell Assembler...........sigh. 1 hour ago, Efros said: Same here, finished my BSc in 1981, MSc and PhD, '86 and '90 respectively, I was working while doing both of these, hence the large time intervals. Even in 1990 online resources were relatively rare and subject to phone line speed downloads. 78, 83, 88, 17 & 18.... My Grand Children dared me to "go back to school" and challenged me to match grades.... Now, here I am yet again, with the last of them and I can bet you, there will be another "If I have to go to school, you should too ! Talk is cheap Gramps..." OK, what would be fun this time >? Strategic Leadership masters maybe........of course, they can't define what their concept of "strategic" is so.......maybe, another masters genre altogether. This time in English maybe - so, I'd have an excuse to finish a book I am writing........procrastinating actually. And yes, it's a lot easier to "see data" and I really don't understand the complaining the "Like" generation spews....... 1
Efros Posted December 22, 2024 Posted December 22, 2024 4 hours ago, Justin_Simpleton said: My first computer was an Osborne 1. It came with GBasic, Supercalc, Wordstar, and other software. I had Fortran running on it. I hooked up a modem to it and downloaded a copy of Business Commerce Daily that took 24 hours to download. This had the Z80 processor and the operating system was CP/M. It tended to overheat when ambient temperatures were above 95 F because there was no cooling fan (though available as an option). I was a subscribed member of FOG (first Osborne group). Ah, the good ole days. Place I worked had a couple of these and a few TRS80s, complete with daisywheel printers that could shake the building when in full flight. 5
Snargfargle Posted December 22, 2024 Posted December 22, 2024 2 hours ago, Asym said: My Grand Children dared me to "go back to school" Second careers are interesting. The chief of police at one smallish university I attended was a retired English professor and published author (he wrote a fairly-well-known "western" book series). He and his wife had moved to the city to be closer to their grandkids but when the grandkids grew up and moved away he got bored and started looking around for another job. 3
Wolfswetpaws Posted December 22, 2024 Posted December 22, 2024 5 minutes ago, Snargfargle said: Second careers are interesting. The chief of police at one smallish university I attended was a retired English professor and published author (he wrote a fairly-well-known "western" book series). He and his wife had moved to the city to be closer to their grandkids but when the grandkids grew up and moved away he got bored and started looking around for another job. Was he on this list? 🙂 https://www.artofmanliness.com/living/reading/21-western-novels-every-man-should-read/
Snargfargle Posted December 22, 2024 Posted December 22, 2024 2 minutes ago, Wolfswetpaws said: Was he on this list? 🙂 https://www.artofmanliness.com/living/reading/21-western-novels-every-man-should-read/ I was just looking through a longer list of western authors but I can't recall his name. I do remember going to the bookstore at the mall (back when they existed) and finding one of his books by a title he'd mentioned. I'd talk to him every once in a while because his office was next door to where I picked up the vans to take my students on field trips. He was in his 70s then and almost certainty is deceased now. Speaking of "retro" computer programming. In electronics school I built an 8086-based computer. This wasn't an assembly like we do nowadays but a ground-up build. I even etched my own circuit boards and built the power supply unit. It didn't have a graphics card, but it did have a keyboard input, an LED array, and a parallel port to send output to a printer or to control other projects. I sort of wish I still had it but I didn't want to pay for all of the chips in order to take it home with me. It became one of the student projects in the teaching collection. 2
Ensign Cthulhu Posted December 23, 2024 Author Posted December 23, 2024 22 hours ago, Snargfargle said: This was back before computerized databases were a thing so I had to spend hours every day pouring through scientific journals and reading abstracts in order to collect the articles needed for my research. I had to write short papers for subjects in medical school in the late 80s/early 90s, so I know that feeling too. For my programming, I'm working with print-on-demand reproductions of books I never even dreamed existed back then. Except they did; I just didn't know about them. And when I say reproductions, I mean it; they scanned a copy of the book that had other people's notes pencilled in!!! 2
Admiral_Karasu Posted December 23, 2024 Posted December 23, 2024 3 hours ago, Ensign Cthulhu said: I had to write short papers for subjects in medical school in the late 80s/early 90s, so I know that feeling too. For my programming, I'm working with print-on-demand reproductions of books I never even dreamed existed back then. Except they did; I just didn't know about them. And when I say reproductions, I mean it; they scanned a copy of the book that had other people's notes pencilled in!!! What would happen if, say, the only extant copy of some book had had someone drawing dirty pictures in the margins?
Ensign Cthulhu Posted December 23, 2024 Author Posted December 23, 2024 1 hour ago, Admiral_Karasu said: What would happen if, say, the only extant copy of some book had had someone drawing dirty pictures in the margins? 1
Wolfswetpaws Posted December 23, 2024 Posted December 23, 2024 2 hours ago, Admiral_Karasu said: What would happen if, say, the only extant copy of some book had had someone drawing dirty pictures in the margins? We could "charge extra" for the "illustrations"? 😄 2
Estaca_de_Bares Posted December 23, 2024 Posted December 23, 2024 3 hours ago, Admiral_Karasu said: What would happen if, say, the only extant copy of some book had had someone drawing dirty pictures in the margins? 21 minutes ago, Wolfswetpaws said: We could "charge extra" for the "illustrations"? 😄 Not too far-fetched, actually. I recall reading an anecdote about a certain painter, can't remember his name though: he hadn't signed many of his works prior to becoming well-known, so someone brought an alleged painting of his asking for the signature to be added and he complied without much thought. Well, a later analysis of the pigmentation confirmed it to be a fake but, since it's the only "official fake", it's valued roughly the same as his more renowned creations. On 12/22/2024 at 2:34 PM, Justin_Simpleton said: My first computer was an Osborne 1. [...] Not owned but used one a few times. Save for the understandably small screen (first time a portable computer had it built-in), the whole package was such a marvel that I even tried to create a very limited Wordstar look-alike while learning -more like "picking things from the manual, putting them together and crossing fingers" to be honest- the basics of BASIC on a 286 later on. On 12/22/2024 at 2:42 PM, Justin_Simpleton said: Win7 messed up a lot of legacy devices and software because they changed a number of DLLs which made the device drivers stop working. It also wouldn't support Visual Studio 6 programming software. The mess-up started with the change from DOS-based to NT-based Windows for the general consumer market. I had to run dual boot (98 + XP) on machines for a few years because the HAL didn't let direct access to devices on the latter OS, and some programs' versions I worked with still required being able to do so. Compared to that, Win7 was a walk in the park -not to mention reasonably tinker-friendly, unlike Vista-, although it's true that it lost a lot of legacy support. Salute. 4
Admiral_Karasu Posted December 23, 2024 Posted December 23, 2024 7 minutes ago, Estaca_de_Bares said: Not too far-fetched, actually. I recall reading an anecdote about a certain painter, can't remember his name though: he hadn't signed many of his works prior to becoming well-known, so someone brought an alleged painting of his asking for the signature to be added and he complied without much thought. Well, a later analysis of the pigmentation confirmed it to be a fake but, since it's the only "official fake", it's valued roughly the same as his more renowned creations. Not owned but used one a few times. Save for the understandably small screen (first time a portable computer had it built-in), the whole package was such a marvel that I even tried to create a very limited Wordstar look-alike while learning -more like "picking things from the manual, putting them together and crossing fingers" to be honest- the basics of BASIC on a 286 later on. The mess-up started with the change from DOS-based to NT-based Windows for the general consumer market. I had to run dual boot (98 + XP) on machines for a few years because the HAL didn't let direct access to devices on the latter OS, and some programs' versions I worked with still required being able to do so. Compared to that, Win7 was a walk in the park -not to mention reasonably tinker-friendly, unlike Vista-, although it's true that it lost a lot of legacy support. Salute. I get it, always sign your dirty doodles so @Ensign Cthulhu will be able to charge extra for them. 😁
Snargfargle Posted December 23, 2024 Posted December 23, 2024 4 hours ago, Admiral_Karasu said: What would happen if, say, the only extant copy of some book had had someone drawing dirty pictures in the margins? In a few hundred years the manuscripts would be considered "priceless." 3
Wolfswetpaws Posted December 24, 2024 Posted December 24, 2024 3 hours ago, Snargfargle said: In a few hundred years the manuscripts would be considered "priceless." I see you left out some of the more vulgar ones. 1 2
Admiral_Karasu Posted December 24, 2024 Posted December 24, 2024 8 hours ago, Wolfswetpaws said: I see you left out some of the more vulgar ones. Very prudent. Though... @I_cant_Swim_ @HogHammer Could the DevStrike! staff get an illustrated copy of Ye Forum Guidelines?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now