| |
oziphantom
Registered: Oct 2014 Posts: 490 |
Packer vs Code VM vs Code Generator
Has anybody experimented with/know of code VMs or Generators.
Just thinking to get code size down they might perform better than exomiser et al.
I know of Sweet16 by Woz any others? |
|
... 80 posts hidden. Click here to view all posts.... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
But it triggers an interrupt from software. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: brk is more useful for systemcall type of things, not "yield" imho
It's for a demo part and not an OS and I have many other IRQs going on so I decided that 1) I don't want to clutter each handler with B-flag check, 2) couldn't take the risk of a possible uncontrolled extra stall in f.e. a tight multiplexer. But yeah I condidered BRK long and hard before I decided to do the manipulation manually (and thus a need for semaphores to block the scheduler from interrupting a "user mode" task switch). |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
(Sorry for being OT, one thing led to another...) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
in my first demo I had "multitasking" with raster irqs. about in 20% for each frame I switched to loader then back. So only one type of return adresses, but I had other problems, the two threads messed up each other's stacks, so I simply copyed back and forth each one's stack (not all of it) to a temp buffer. also all register swapped. worked nicely today I'd just halve the stack and replace S tho. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: in my first demo I had "multitasking" with raster irqs. about in 20% for each frame I switched to loader then back. So only one type of return adresses, but I had other problems, the two threads messed up each other's stacks, so I simply copyed back and forth each one's stack (not all of it) to a temp buffer. also all register swapped. worked nicely today I'd just halve the stack and replace S tho.
I do that too, but split the stack properly. 25% to loader, 75% to plotter, loader yields when not loading. |
| |
oziphantom
Registered: Oct 2014 Posts: 490 |
Make 128 demos, problem solved :D |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: I do that too, but split the stack properly. 25% to loader, 75% to plotter, loader yields when not loading.
you could just set some flag to tell the irq to stop scheduling the loader in, insead of that supper scifi method? :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: you could just set some flag to tell the irq to stop scheduling the loader in, insead of that supper scifi method? :)
I did consider that also, but was too boring to code |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
well yeah certainly a more sexy solution :) brk could work too tho if you replace all your raster IRQs with NMIs :) |
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
NMI happening during BRK will cause BRK to be ignored. See http://visual6502.org/wiki/index.php?title=6502_BRK_and_B_bit#N.. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next |