Re: Learning to use PICS

From: john jardine (john_at_jjdesigns.fsnet.co.uk)
Date: 11/27/04


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



Relevant Pages

  • Re: 32 bit FORTH ??? Different tack!
    ... The "Machine Code" microkernal was the initial 'low level' interpreter loop. ... The USB, Thumb drive, HD, CD, problem is a what the 'Kernal' provides interface instructions to. ... My understanding, of what she meant, is that the 'assembler' portion, whether written in Forth, was 'compiled' and the resulting 'machine code' was inserted into the developing system. ... Your microkernel is certainly in no way universal or portable. ...
    (comp.lang.forth)
  • Re: {Historical} Lisp manually compiled to assembly
    ... The core Lisp functions only had to ... [Both instructions and data ... minimum of utility routines in bare machine code -- output a string, ...
    (comp.lang.lisp)
  • Re: definition of a highlevel language?
    ... assembly -> translates to machine code ... high level, sort of as a function from language lines to assembly ... statement in BASIC translated to, on average, 5 assembly instructions, ...
    (comp.lang.python)
  • Re: How To Write An Assembler
    ... how to write an assembler for x86 machine code. ... good tutorial that taught the 86 machine instructions (how the hex ... support for expressions ...
    (comp.lang.asm.x86)
  • Re: Python Interpreter question.
    ... >generally not compiled to actual machine code, but, as I understand it, to ... One can, I believe, think of Pentiums ... The complicated instructions are in microcode, ...
    (comp.lang.python)

Quantcast