Skip to Content
The Art of Assembly Language, 2nd Edition
book

The Art of Assembly Language, 2nd Edition

by Randall Hyde
March 2010
Beginner content levelBeginner
760 pages
18h 51m
English
No Starch Press
Content preview from The Art of Assembly Language, 2nd Edition

4.19 HLA Array Constants

The last few examples in the previous section demonstrate the use of HLA array constants. An HLA array constant is nothing more than a list of values surrounded by a pair of brackets. The following are all legal array constants:

[ 1, 2, 3, 4 ]
[ 2.0, 3.14159, 1.0, 0.5 ]
[ 'a', 'b', 'c', 'd' ]
[ "Hello", "world", "of", "assembly" ]

(Note that this last array constant contains four double-word pointers to the four HLA strings appearing elsewhere in memory.)

As you saw in the previous section, you can use array constants in the static and readonly sections to provide initial values for array variables. The number of comma-separated items in an array constant must exactly match the number of array elements in the variable declaration. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

x64 Assembly Language Step-by-Step, 4th Edition

x64 Assembly Language Step-by-Step, 4th Edition

Jeff Duntemann
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie

Publisher Resources

ISBN: 9781593272074Errata Page