IRQ Installer
Moderator: Moderators
Re: IRQ Installer
I am curious... is there a practical reason for why this has to be fully relocatable? Or is it just for the challenge?
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: IRQ Installer
Yeah, nice!Mike wrote: ↑Sat Mar 07, 2020 6:00 pm Anyhow, here's a slightly smaller version, with the roles of X and Y reversed. Interrupts are disabled just around the critical section. The "GetPC" routine probably gets used more than once in a bigger example, so I used $03/$04 as scratch pad - with the offset added to Y:X with TXA and TYA (instead of doing STX $03, STY $04 as yet another temporary store in between):
I was able to shave off one byte by removing
Code: Select all
.2020 8A TXA
I'm not sure yet, really. I'm just going to have it around in case something comes up later.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
- Mike
- Herr VC
- Posts: 4871
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: IRQ Installer
Good morning!
...
Yeah, it was around 1 A.M. local time when I wrote this code. At this time of day, such things inevitably slip through.chysn wrote:I was able to shave off one byte [...]
...
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: IRQ Installer
For me, the difference between a high-level language and machine language is that, in my machine language code, I keep finding optimizations for a much longer time, pretty much whenever I seriously inspect it. I always imagine that there's this perfectly-efficient version of what I want to do that takes flawless advantage of every trick out there, and all the laws of physics and thermodynamics, that I probably wouldn't even recognize as a "program," and that's only half as long as what I wrote.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
Re: IRQ Installer
Stared at it for a while, looking for an opportunity to shave off another byte with an illegal opcode - but it seems to be quite optimal now
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
- chysn
- Vic 20 Scientist
- Posts: 1205
- Joined: Tue Oct 22, 2019 12:36 pm
- Website: http://www.beigemaze.com
- Location: Michigan, USA
- Occupation: Software Dev Manager
Re: IRQ Installer
Thanks for taking a look!
I should take some time to learn the illegal opcodes. My geek buddies and I discovered some of them in middle school, but we never wrote anything down.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5
WIP: MIDIcast BASIC extension
he/him/his
WIP: MIDIcast BASIC extension
he/him/his
Re: IRQ Installer
<shameless self advertising>
i have spent a lot of time on researching them and proving/verifying how they work in the past years... i think by now the most complete document on the matter can be found here
</shameless self advertising>
i have spent a lot of time on researching them and proving/verifying how they work in the past years... i think by now the most complete document on the matter can be found here
</shameless self advertising>
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.