beautypg.com

Bfract and ubfract declaration types, Fract and ufract declaration types, Blkb declaration type – Zilog Z8F0130 User Manual

Page 322

background image

Using the Macro Assembler

UM013037-1212

298

Zilog Developer Studio II – Z8 Encore!
User Manual

BFRACT and UBFRACT Declaration Types

Syntax

BFRACT

signed fractional (8 bits)

UBFRACT

unsigned fractional (8 bits)

Examples

BFRACT [3]0.1, [2]0.2 ; Reserve space for five 8-bit

; signed fractional numbers.

; Initialize first 3 with 0.1,

; last 2 with a 0.2.

UBFRACT [50]0.1,[50]0.2 ; Reserve space for 100 8-bit

; unsigned fractional numbers.

; Initialize first 50 with a

; 0.1, second 50 with a 0.2

BFRACT 0.5 ; Reserve space for one 8-bit signed, fractional number

; and initialize it to 0.5.

FRACT and UFRACT Declaration Types

Syntax

FRACT

signed fractional (8 bits)

UFRACT

unsigned fractional (8 bits)

Examples

FRACT [3]0.1, [2]0.2 ; Reserve space for five 16-bit

; signed fractional numbers.

; Initialize first 3 with 0.1,

; last 2 with a 0.2.

UFRACT [50]0.1,[50]0.2 ; Reserve space for 100 16-bit

; unsigned fractional numbers.

; Initialize first 50 with a

; 0.1, second 50 with a 0.2

FRACT 0.5 ; Reserve space for one 16-bit signed, fractional number

; and initialize it to 0.5.

BLKB Declaration Type

Syntax

BLKB

number of bytes (8 bits each) [, <init_value>]