Commodore C64 - 1982 - Page 1
Forum section: electronics / general

author: GlennSprigg
author_rank: Super Contributor
timestamp: June 21, 2018, 01:28:34 pm
content: 195 views, but 0 replies/comments !!!!I thought it was great when it came out !!!!!!!! As a tech-head, I fully embraced it for whatit was, pre- 'PC's..... YES it played 'games', but I immediately looked into & developed somesoftware for small businesses with it!!! Mainly in the realm of 'Databases', using "Superbase".I wrote software & macros for neat graphical interfaces for all that !!!!! (Was all we had!).(Interestingly more powerful than the initial spacecraft computers on 1st moon missions!).I designed Cartridge Interfaces, wrote headers/boot-loaders, and custom 1541 drive software.Then the 'World' collapsed !!! hahaha.... 'PC's came along !!!!!!!!.... ok.....Re-write software using 'Ashton-Tate's "D-Base", and new graphical interfaces !!! (Fun times).It's all MOOT today :-), but the again..... it was SIMPLE then !!!!!!!!!!!!These days, using 'modern' packages, 'one' creates numerous megabytes of 'coding', for themost simplest of things.... that used to be done in '2k', or '10k'......................

author: BillB
author_rank: Unknown
timestamp: June 21, 2018, 03:19:47 pm
content: I have fond memories of the C64.The early pre/PC days were a great time to be a computer tinkerer.

author: GlennSprigg
author_rank: Super Contributor
timestamp: June 23, 2018, 02:41:37 pm
content: Quote from: BillB on June 21, 2018, 03:19:47 pmYea mate... It's what we "Cut or teeth on" in the 'computing' field !A new 'whipper-snapper' these days starts at Uni, learning 'C++' of what ever :-)(And of course 'HTML5'/Javascript/CSS)...But do they know about 'Machine-Code' !!!!!!! hahaha.....LD R1, xOOF ; load address of dataAND R4, R4, #0 ; set even-counter to 0AND R5, R5, #0 ; set odd-counter to 0;; begin loop to process numbers;x3003 LDR R2, R1, #0 ; load next numberBRz xOOC ; branch to end if zero;; check for even or odd;AND R3, R2, #1 ; use mask to check bit-0BRz xOO9 ; branch if evenADD R5, R5, #1 ; increment odd-countBRnzp xOOA ; branch to get next numberx3009 ADD R4, R4, #1 ; increment even-count;; get next number;Not to mention for which 'Processor'.....It was Fun, (though sometimes complex), but 'Tight' !!!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 23, 2018, 04:37:29 pm
content: Quote from: GlennSprigg on June 23, 2018, 02:41:37 pmHardly forgotten -- there's a thing called WebAssembly now. You load a Uint8Array with various specific bytes, then execute it in a virtual machine (which, I don't know what instruction sets are available, or if it's specific to x86). What's old is now new again!C and friends are rather useful shortcuts. There are so many things you encounter in assembler that are pure tedium, that you don't need to be wasting your time writing. Especially on RISC instruction sets. Far better to have the compiler do it for you. Learn the inner workings of C -- inspect the assembler output it generates! -- and treat the compiler as an assembler generator.This is a valuable perspective in VHDL too, though there the instantiation is more direct: you're describing gates, latches, state machines and so on. The key is you're doing it far quicker than you could write a schematic, and you're doing it at scale, and optionally with parameterization, too!Which is not to say, abuse the compiler to generate whatever assembly you think you want. Respect its semantics. Don't force it to do something special-case and fragile; talk nicely to it, work within its semantics to generate code that is both robust and efficient.I was just telling someone about the inner workings of object-oriented programming (OOP) -- if you're having trouble working with the abstraction, then consider a concrete example.I don't know if all OOP languages follow this design, internally. After all, it shouldn't matter, and doesn't -- that's the point of the abstraction, not needing to know! But at the very least, this is still one possible implementation of it, and where a concrete example is needed, it's perfectly fine!Anyway: what is an "object"?An object is a structure, a block of memory organized as a set of parameters, given special (object-specific) meaning. In C, a struct.The special thing about an "object" is the struct contains function pointers, to functions that operate on the object.So, an OOP implementation in C would add function pointers to the struct, which are initialized to whatever functions operate on that struct. (The initialization is called "construction".)When you say "object.doStuff()", you're actually calling "object.doStuff(&object);" -- the object itself is passed in, implicitly, as a parameter to the function. In the function, the object appears as the variable: "this".When every object of that type is constructed, the same functions are bound to it. So the functions are all the same, across objects. Same code, residing at the same address, but able to serve any object of that type, anywhere in memory.This is very apparent once you study C++ -- there, the whole process is explicit, all exposed for you. Most of the time, you don't want to touch that, you want to stick with the default behavior and harness the simple, powerful syntax of OOP. But the option is there, for the expert programmer, to control all of these internals. It is likewise their responsibility to make sure references don't get screwed up in the process!Tim

author: ebastler
author_rank: Super Contributor
timestamp: June 23, 2018, 05:29:03 pm
content: Quote from: GlennSprigg on June 23, 2018, 02:41:37 pmHmm, why would one learn assembly language for an "educational" non-existing processor, rather than a real one? I had not come across the LC-3 before -- I'm curious, where did you encounter it?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 23, 2018, 06:25:33 pm
content: Quote from: ebastler on June 23, 2018, 05:29:03 pmThese come to mind:https://store.steampowered.com/bundle/2000/The_Hacking_Bundle/I've heard of TIS-100 before, it's a VM like that I think. Hack'n'Slash is well drawn with a nice story, though it's not based on VMs, but Lua instead.Tim

author: chris_leyson
author_rank: Super Contributor
timestamp: June 24, 2018, 03:02:02 am
content: QuoteCoolI was an Atari guy, had an Atari 800. Cloned the 810 disk drive but used a surplus 80 track 8" disk drive because they were cheaper than the newer 4.5" drives. I even found a local stationary store that sold boxes of 8" disks single sided disks, punch a hole in the disk "wallet" and now you've got twice the storage !! Can't remember which WD controller it used but it was well "tweekable" and I managed a few Mbytes storage on a single disk, it was way better than cassette tape. Atari published the compltete assembler software listings for their computers and peripherals, I had the Atari 800 operating system printed on fanfold paper in two cardboard boxes !!Never owned a C64 but I remember fixing them and having to replace the video chips, they ran really hot, I don't think the springy heatsink thing worked too well, not enough contact area.

author: GlennSprigg
author_rank: Super Contributor
timestamp: June 25, 2018, 12:04:31 pm
content: Quote from: ebastler on June 23, 2018, 05:29:03 pmI'm sorry mate.... the 'sample' coding depicted was a 5-sec 'grab' of something 'Mc' like, todemonstrate the 'difference' between that, and modern coding methods/looks.......It was NOT meant to represent ANYTHING 'specific', such as a Commodore-64 '6510' microprocessor,or for in around the days, a 'Z80' microprocessor.... It wasn't an 'example' to depict/explain anything.In those days, primitive & "Educational" was all we had to use ! but we took it beyond the original 'toy'.