Re: [Phix] ? operator; string behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message

You found a bug! (actually in puts not ?, btw)

In builtins/VM/pfileioN.e, line 5195:

    [ELF64] 
--%rax  System call             %rdi                    %rsi                            %rdx                    %rcx                    %r8                     %r9 
--1     sys_write               unsigned int fd         const char *buf                 size_t count 
        mov rax,1               -- sys_write 
--      rdi already set         -- fd 
--31/10/17 (thanks to tom for finding this) 
--      mov rcx,rsp             -- buffer (==rdx btw) 
        mov rsi,rsp             -- buffer (==rdx btw) 
        mov rdx,1               -- count 
        syscall 

Despite having copied the api out for reference, I completely ignored it and set rcx instead of rsi, which just happens to be always pointing at the next character.

Obviously, after that 2-character edit, just run ".\p -c p" and it should be fixed.

Thanks, Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu