OSLib Hdr macros

Cameron Cawley ccawley2011 at gmail.com
Fri Jul 17 21:14:22 BST 2026


Hi

I haven't checked the correctness of the new code, but I should mention
that MSR is a no-op on ARM3 and earlier, so it would be good for the macro
to be fully 26/32-bit neutral instead of just one or the other.

Are these used anywhere that could be used to verify the correctness in
practice?

Regards
Cameron


On Fri, 17 Jul 2026 at 09:41, Jean-Michel via oslib-user <
oslib-user at lists.compton.nu> wrote:

> Hi
>
> I just noticed that the oslib.Hdr.macros was not up to date: there are 26b
> instructions!
>
> eg.
>         MACRO
> $label  SetN
>         ;C=0 V=0 Z=0 N=1
> $label  CMN     PC, #&80000000
>         MEND
>
> idem for SetV; SetZ, SetC
>
> I hope the version below is correct:?
> ; 32 bit PSR:
> ;  N|Z|C|V
>         MACRO
> $label  SetN
>         ;C=0 V=0 Z=0 N=1
>         MSR  CPSR_flg,#0x80000000    ; Set all the flags regardless
>                                      ; of their previous state
>                                      ; (does not affect any control bits)
>
> Thanks,
> --
> Jean-Michel
>
> _______________________________________________
> oslib-user mailing list
> oslib-user at lists.compton.nu
> https://lists.compton.nu/mailman/listinfo/oslib-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.compton.nu/pipermail/oslib-user/attachments/20260717/bf0c6860/attachment.htm>


More information about the oslib-user mailing list