I wrote a computer virus in assembly that copies itself into RAM 16 bytes above its current location, and then executes that copy of itself!
Пікірлер: 13
@BitwiseMobile3 жыл бұрын
My first processor was the 8086 which is a close cousin to the Z80. I taught myself assembly when I was 13 by using the venerable DOS command called DEBUG which allowed me to enter opcodes directly into memory and execute those opcodes while observing the registers changing. This is like taking a walk down memory lane. I remember trying to get the IBM Technical manual and any schematics I could to figure out all the peripheral chips and how to control them :). It started a life long love of computers and electronics.
@flexairz3 жыл бұрын
I did somewhat the same thing back in the day but with the SDK-85 from Intel. A 8085 kit. Now I am back into retro with the RC2014 Mini.. loving it!
@carlam66693 жыл бұрын
The LDIR instruction can be used to quickly zero out a block of memory by setting HL to the beginning of the block, DE to HL+1, BC to the size of the block minus one, set the first location to zero then let her rip with the LDIR. Or fill the area that will be used by the stack with some unique number so you can how much of the stack has been used.
@TomStorey963 жыл бұрын
If you want to read the PC you can do a CALL forward to the next instruction, which will push the PC onto the stack, you can then pop it off. For something that is going to self replicate you'll need to do a little work to modify the address that is CALLed, so not necessarily a trivial operation.
@carlam66693 жыл бұрын
That assumes you’ve already set the stack pointer above a usable block of memory. Then sprinkle in a little self-modifying code to modify the address that the CALL instruction is branching to.
@LongnoseRob4 жыл бұрын
Would be nice to have a soft core Z80 in an FPGA to also be able to see the internals of these op-codes
@johnmarks714 Жыл бұрын
All you need is permanent storage and a way to intercept IO and then your virus can replicate from flash drive to flash drive. Bonus points if you can make it reset resistant (survive resets)
@vanhetgoor3 жыл бұрын
It really looks nice, flashing lights are only on real computers. Not that flashy card, that means nothing. Grouping the LEDs so that they can be read by humans is great too. From the blinkety blink you go to understanding. Thanks, this is constructive!
@patrickdemets60183 жыл бұрын
Interesting. Food for thought as I'm planning to experiment with breadboard computers from (nearly) scratch with 6800, 6502, and eventually Z80. Also, I really love your paper with the grey banding. Where is that available? Size A5 or half-Letter? Thx
@mheermance3 жыл бұрын
I'm surprised to see you single stepping a Z80 like that. The 65C02 has a static core, so the clock can be suspended and you can single step by pulsing the clock. Does the Z80 allow for a halted clock?
@KennethFinnegan3 жыл бұрын
Yep. The Z80 was always a static design, so even pre-CMOS models you could single step it (but I believe that you had to leave the clock high. I was having problems with NMOS parts wigging out after 1-2 seconds with the clock low.)
@SusanAmberBruce3 жыл бұрын
Ah I made myself a nice cup of CoCo and sat down to watch this vid, Just been trying to get some code to work on the Arduino and I was thinking; wouldn't it be great if there was a board like the Arduino that could be programmed in Z80 or 8080 machine code.
@edgeeffect3 жыл бұрын
A0FF: CALL $A102 ; POP HL ; JP $8000 - Will copy PC into HL