Re: Learning to use PICS
From: john jardine (john_at_jjdesigns.fsnet.co.uk)
Date: 11/27/04
- Next message: John Smith: "Re: snubber resistor power rating?"
- Previous message: Harry Dellamano: "Re: snubber resistor power rating?"
- In reply to: Sergio Masci: "Re: Learning to use PICS"
- Next in thread: Sergio Masci: "Re: Learning to use PICS"
- Reply: Sergio Masci: "Re: Learning to use PICS"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 27 Nov 2004 17:10:10 -0000
"Sergio Masci" <sergio@NO.SPAM.xcprod.com> wrote in message
news:41a89667$0$1067$db0fefd9@news.zen.co.uk...
>[clip]
>
> The XCSB compiler will convert the following to just 6 machine code
> instructions:
>
> proc inline set_bit(ubyte *addr, ubyte id)
> *addr = *addr | (1 << id)
> endproc
>
> proc inline clear_bit(ubyte *addr, ubyte id)
> *addr = *addr & ~(1 << id)
> endproc
>
> proc inline ubyte test_bit(ubyte *addr, ubyte id)
> return (*addr & (1 << id) != 0)
> endproc
>
> proc main()
>
> ubyte a, b
>
> if (test_bit(&a, 1) then
> set_bit(&b, 2)
> else
> clear_bit(&b, 2)
> endif
> endproc
Looks like "C" to me.
I know this must be so, as I can't understand it :-).
Yet I can easily read the 'Proton','CH-flash', 'iL_Bas16' etc Basics.
regards
john
- Next message: John Smith: "Re: snubber resistor power rating?"
- Previous message: Harry Dellamano: "Re: snubber resistor power rating?"
- In reply to: Sergio Masci: "Re: Learning to use PICS"
- Next in thread: Sergio Masci: "Re: Learning to use PICS"
- Reply: Sergio Masci: "Re: Learning to use PICS"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|