[Coco] questions about constants
Lothan
lothan at newsguy.com
Sat Sep 12 21:44:17 EDT 2009
Actually, not quite. With OS-9 assemblers
fcs /Basic09/
-or-
fcs "Basic09"
is equivalent to:
fcc 'B'
fcc 'a'
fcc 's'
fcc 'i'
fcc 'c'
fcc '0'
fcb '9' + 0x80
or equivalently
fcc "Basic0"
fcb '9' + 0x80
The differentiation is the fcb is for a single byte, fcc is for character
data, and fcs is for strings in which the last character has the high-bit
set. There is no fci, fcr, fcd with the assemblers that came with OS-9 or
the Development System.
The delimiters don't really matter quite so much with fcc/fcs so you can use
/, ', ", and perhaps a few others depending on your needs, but the delimiter
at the start of the string must be the delimiter used to end the string.
--------------------------------------------------
From: "Wayne Campbell" <asa.rand at yahoo.com>
Sent: Saturday, September 12, 2009 7:41 PM
To: <coco at maltedmedia.com>
Subject: [Coco] questions about constants
> I have looked at a dozen tutorials on assembly language programming. None
> of them address the op codes fcb, fcc or fcs, so I'm asking the assembly
> gurus on this list to help explain this to me.
>
> What are the differences between fcb, fcc and fcs?
> Is there a fci or fcr(/f/d) (for integer and real(/float/double) values)?
>
> I know that:
>
> fcb = form constant byte = any constant numeric byte value?
> fcc = form constant char = any constant character that is displayable?
> fcs = form constant string = any constant string?
>
> Are the following equivalent, so far as the assembler is concerned?
>
> A. form constant byte:
>
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $20
> fcb $42 B
> fcb $41 A
> fcb $53 S
> fcb $49 I
> fcb $43 C
> fcb $30 0
> fcb $39 9
> fcb $0A
>
> B. form constant string:
>
> fcs / BASIC09/
> fcb $0A
>
> C. would using form constant char be equivalent?
>
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc ' '
> fcc 'B'
> fcc 'A'
> fcc 'S'
> fcc 'I'
> fcc 'C'
> fcc '0'
> fcc '9'
> fcb $0A
>
> Wayne
>
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list