Anyone like programming in Assembly?
QuantumCowboy
Veteran

Joined: 13 May 2007
Age: 46
Gender: Male
Posts: 897
Location: (1/√2)|0> + (1/√2)|1>
Just to reassure people, the above was naturally only in your dreams.
I have come across only one machine that was designed (on purpose) in a way that allowed the machine instructions to destroy it. That was a very early graphics processing machine, that used multiple parallel processing elements connected via a rat's-nest of buses. You could program it to connect outputs to outputs, which is generally speaking, always a bad idea. Their assembler tried hard to stop you coding suicidal instructions.
No, you could set the monitor to an insanely high resolution. Given time, the CRT could not handle it, and would implode. I was also getting several chipsets to send current down a bus simultaneously. It was more than it could handle, with innevitable results. Many of the PC and XT clones had little to no protection built into them. There was of course some obsfucation needed, but it was doable.
_________________
The ket always seems to psi over its own indeterminacy.
(insert manly YEARRRRRRH! here) -- real men do self-modifying, undocumented, spaghetti-style assembly code -- that high-level, object-oriented stuff is for civil engineers and such wussies!
I cut my assembly teeth on the Commodore 64, the 6510 CPU of which is part of the famous 6502 family of 8-bitters. And the 64 demonstrates the powers of assembly very well; this thing came out in 1982, and someone actually managed to get this 8-bit, 1MHz device to play DOOM
Besides the joy of assembly coding, the hardware of the Commodore 64 (especially the video circuitry) provided some pretty neat but undocumented featues that the programmer-in-the-know can use in many creative ways.
All of a sudden Visual Basic seems like a bureaucratic kludge in comparison with my nimble Omikron Turbo Assembler on the 64...!
Ooh yes! Commodore 64 and assembly programming for the 6502.
Happy times indeed. Amongst all my programs I wrote a commercial program to rewrite other peoples basic programs so they ran fully optimised - a sort of pseudo compiler. It also had options to renumber basic programs including all the goto and gosubs. I also added a feature so progs would load faster too by doing a buffer overrun which ran my assembly then loaded the basic program without the verification pass - which was generally just a waste of time.
The speed of the raw assembly was just amazing - Initially I wrote my own simple compiler but then bought one (Zeus assembler as I remember).
Debugging was fun - I made an extra button for the computer that plugged into the back that allowed me to short one of the processor pins to trigger a reboot but without clearing the memory - very useful - assembly programs don't tend to crash gracefully with nice things like error messages, just a dead machine.
For extra memory you could also use the bits at position 0 to turn off the shared ROM banks of memory to get access to the full 64K - and take care of the interrupts yourself - in effect run your own operating system.
In comparison, despite the leaps in processor speeds it really annoys me how slow .Net visual basic is. I just bough Visual Studio 2008 - yawn.
Managed to fill the 8K of RAM on a PIC16F88 (about half of it data though) doing very optimised PWM for 12xLEDs (4xRGB groups).
Optimising that code to run on a chip at 8MHz, without the PWM showing as visible strobing when the LEDs moved was the most fun I've ever had programming (especially because other people had to use faster chips to do less LEDs with C/BASIC). Shaving a few instructions off the main loop was really satisfying, even when it made the code harder to understand later on, because of the way everything in the loop was re-ordered.
_________________
You aren't thinking or really existing unless you're willing to risk even your own sanity in the judgment of your existence.
Sometimes I like to write something in x86 ASM, e.g. I can create simple Win32 GUI application in ASM. DOS programming with handling interrupts is interesting too. Another amazing usage of assembly language is turning shareware into freeware (debugger needed ) - "(с) сopyright" means "copied right"


I think we have some thing to talk about mister. Send me a PM with some docs
