« first day (591 days earlier)      last day (858 days later) » 

03:04
@KZhang Where physically in the computer is the PC? Is it in the same place with the RAM?
If so I wonder if I could preset it to the entry point
@quartata I believe it's RAM address 0.
PC is indeed RAM address 0
No I know, but is it really in RAM
OK, so if I emit the RAM along with the ROM I could set its initial value to whatever
03:08
Technically yes
I'm sensing a caveat
Actually, the first instruction executed is always instruction 0
oh bummer
I'll have to put a jump in then
the agony of one extra instruction
And then, the next instruction should be whichever the PC is set to
Well in that case I could probably just put a NOP in instruction 0 and preset the PC. Would be shorter than the jump + delay slot
although hmm
no that should be fine, I don't have any run time stack init to do first
@KZhang one more thing: GCC tries to compile nested functions using what's called a trampoline, which is essentially a little bit of code pushed onto the stack at runtime in place of the function address that calculates the proper address to jump too. I don't fully understand why it's necessary but it's not possible currently since we can't execute anythng in RAM
I'll try to do a little bit more research into how it works to see what we can do
but since it is a hardware limitation I thought I'd get your two cents
03:25
I'd require quite a bit of work to be able to execute from RAM, but I'll read about the trampoline to see if we can find a workaround
let me get the page on it
I don't really get the point tbh but I'm guessing there's some reason why it doesn't know the location of the function
I can probably hook it into doing anything when it would normally emit one though
Can't find much else about them so I'll try to write a C snippet and see what the x86 assembly looks like sometime

« first day (591 days earlier)      last day (858 days later) »