and before you know it, you can run hunt the wumpus!
On Fri, 29 Aug 2025 at 23:22, Charles Forsyth <[email protected]>
wrote:
> it's perhaps subtle just to track it down. with enough registers, and
> depending on the architecture's addressing, plan 9 c uses a Static Base
> register ("SB") to access data.
> on Risc-V it looks like R3 is SB, so you need something early in chuck.s
> that sets SB. in fact, make it the first instruction.
> It might be
> MOV $setSB(SB), R3
>
>
> On Fri, 29 Aug 2025 at 21:51, José J. Cabezas Castillo <
> [email protected]> wrote:
>
>> Thank you very much — that’s exactly it. I modified the chuck.s loader,
>> and now the execution continues, but nothing is being printed.
>>
>> I've found that in another part of the code, the PC resets to 0 again
>> (when it tries to access the string data). I want to run more tests before
>> asking for help.
>>
>> José J.
>>
>> El vie, 29 ago 2025 a las 21:40, <[email protected]> escribió:
>>
>>> I think you need to start chuck.s with
>>> TEXT start(SB), $-4
>>> This treats the routine as a leaf function and doesn't insert code to
>>> make space for parameters on the stack, which I believe is what's happening
>>> with R2.
>>>
>>> David
>>>
>>
>>
>> --
>> José J. Cabezas
>> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
>> <https://9fans.topicbox.com/groups/9fans> + participants
>> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
>> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
>> <https://9fans.topicbox.com/groups/9fans/T3f252d4d7c5389ee-Mcb6858e8d8e1e6d455fa8cbf>
>>
------------------------------------------
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/T3f252d4d7c5389ee-Md8718ca7512d7da2abe3c6ff
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription