Bytes 'n bytes

This topic contains 22 replies, has 4 voices, and was last updated by  Gwenel 12 months ago.

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #14484

    Gwenel
    Participant

    Here is one way to do SAR if anyone needs it. It could use optimisation if speed is an issue but it’s a start.

    #14487

    Jesse
    Participant

    Thats pretty good. Now all you need is “SAL”.

    #14488

    Gwenel
    Participant

    Nope, SHL & SAL are identical. Lucky us huh?

    #14489

    Jesse
    Participant

    That’s interesting. Never delved deep enough to notice that.

    #14491

    Gwenel
    Participant

    Here’s a shorter variant.

    #14494

    Mark Sibly
    Keymaster

    Shr is signed if operands are signed, eg: -64 Shr 1 does a signed shift right (ie: -32)  while print UInt(-64) shr 1 does an unsigned shift right.

    #14496

    Gwenel
    Participant

    Hahaha my god, okay.  That’s clever. +1 for that

    #14497

    Gwenel
    Participant

    You should really document Monkey2 better, these things are gold.

Viewing 8 posts - 16 through 23 (of 23 total)

You must be logged in to reply to this topic.