Programming With 64bit Arm Assembly Language Single Board Computer Development For Raspberry Pi And Mobile Devices Stephen Smith download
Programming With 64bit Arm Assembly Language Single Board Computer Development For Raspberry Pi And Mobile Devices Stephen Smith download
https://ebookbell.com/product/programming-with-64bit-arm-
assembly-language-single-board-computer-development-for-
raspberry-pi-and-mobile-devices-stephen-smith-11144382
https://ebookbell.com/product/programming-with-openscad-a-beginners-
guide-to-coding-3dprintable-objects-1st-edition-justin-gohde-46410140
https://ebookbell.com/product/programming-with-python-and-its-
applications-to-physical-systems-m-shubhakanta-singh-50637024
https://ebookbell.com/product/programming-with-microsoft-visual-
basic-2012-6th-edition-zak-55132386
Programming With Microsoft Visual Basic 2010 Vbnet Programming 5th
Edition Zak
https://ebookbell.com/product/programming-with-microsoft-visual-
basic-2010-vbnet-programming-5th-edition-zak-55139980
https://ebookbell.com/product/programming-with-java-edet-
theophilus-55229942
https://ebookbell.com/product/programming-with-rust-donis-
marshall-55709862
Programming With C20 Concepts Coroutines Ranges And More Updated 2024
2nd Edition Andreas Fertig
https://ebookbell.com/product/programming-with-c20-concepts-
coroutines-ranges-and-more-updated-2024-2nd-edition-andreas-
fertig-56812174
https://ebookbell.com/product/programming-with-tensorflow-kolla-bhanu-
prakash-g-r-kanagachidambaresan-22736720
TECHNOLOGY IN AC TION™
Programming
with 64-Bit
ARM Assembly
Language
Single Board Computer Development
for Raspberry Pi and Mobile Devices
—
Stephen Smith
Programming with
64-Bit ARM Assembly
Language
Single Board Computer
Development for Raspberry Pi
and Mobile Devices
Stephen Smith
Programming with 64-Bit ARM Assembly Language: Single Board
Computer Development for Raspberry Pi and Mobile Devices
Stephen Smith
Gibsons, BC, Canada
v
Table of Contents
Assembly Instructions�����������������������������������������������������������������������������������22
Data���������������������������������������������������������������������������������������������������������������22
Calling Linux��������������������������������������������������������������������������������������������������23
Reverse Engineering Our Program����������������������������������������������������������������24
Summary������������������������������������������������������������������������������������������������������������26
Exercises�������������������������������������������������������������������������������������������������������������27
vi
Table of Contents
Summary������������������������������������������������������������������������������������������������������������56
Exercises�������������������������������������������������������������������������������������������������������������56
vii
Table of Contents
If/Then/Else���������������������������������������������������������������������������������������������������������94
Logical Operators������������������������������������������������������������������������������������������������95
AND����������������������������������������������������������������������������������������������������������������96
EOR����������������������������������������������������������������������������������������������������������������96
ORR����������������������������������������������������������������������������������������������������������������96
BIC�����������������������������������������������������������������������������������������������������������������97
Design Patterns���������������������������������������������������������������������������������������������������97
Converting Integers to ASCII�������������������������������������������������������������������������������98
Using Expressions in Immediate Constants������������������������������������������������102
Storing a Register to Memory����������������������������������������������������������������������103
Why Not Print in Decimal?���������������������������������������������������������������������������103
Performance of Branch Instructions�����������������������������������������������������������������104
More Comparison Instructions��������������������������������������������������������������������������105
Summary����������������������������������������������������������������������������������������������������������106
Exercises�����������������������������������������������������������������������������������������������������������106
viii
Table of Contents
ix
Table of Contents
Building .S Files�������������������������������������������������������������������������������������������170
Opening a File����������������������������������������������������������������������������������������������172
Error Checking���������������������������������������������������������������������������������������������172
Looping��������������������������������������������������������������������������������������������������������174
Summary����������������������������������������������������������������������������������������������������������175
Exercises�����������������������������������������������������������������������������������������������������������176
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
xiii
Table of Contents
xiv
Table of Contents
Answers to Exercises�����������������������������������������������������������������������419
Chapter 1����������������������������������������������������������������������������������������������������������419
Chapter 2����������������������������������������������������������������������������������������������������������419
Chapter 5����������������������������������������������������������������������������������������������������������420
Chapter 6����������������������������������������������������������������������������������������������������������420
Chapter 8����������������������������������������������������������������������������������������������������������420
Chapter 14��������������������������������������������������������������������������������������������������������421
Index�������������������������������������������������������������������������������������������������423
xv
About the Author
Stephen Smith is also the author of the
Apress title Raspberry Pi Assembly Language
Programming. He is a retired Software
Architect, located in Gibsons, BC, Canada.
He’s been developing software since high
school, or way too many years to record. He
was the Chief Architect for the Sage 300 line
of accounting products for 23 years. Since
retiring, he has pursued artificial intelligence,
earned his Advanced HAM Radio License, and
enjoys mountain biking, hiking, and nature photography. He continues
to write his popular technology blog at smist08.wordpress.com and has
written two science fiction novels in the Influence series available on
Amazon.com.
xvii
About the Technical Reviewer
Stewart Watkiss is a keen maker and
programmer. He has a master’s degree in
electronic engineering from the University
of Hull and a master’s degree in computer
science from Georgia Institute of Technology.
He has over 20 years of experience in the
IT industry, working in computer networking,
Linux system administration, technical
support, and cyber security. While working
toward Linux certification, he created the web
site www.penguintutor.com. The web site originally provided information
for those studying toward certification but has since added information on
electronics, projects, and learning computer programming.
Stewart often gives talks and runs workshops at local Raspberry Pi
events. He is also a STEM Ambassador and Code Club volunteer helping to
support teachers and children learning programming.
xix
Acknowledgments
No book is ever written in isolation. I want to especially thank my wife,
Cathalynn Labonté-Smith, for her support, encouragement, and expert
editing.
I want to thank all the good folk at Apress who made the whole process
easy and enjoyable. A special shout-out to Jessica Vakili, my coordinating
editor, who kept the whole project moving quickly and smoothly. Thanks
to Aaron Black, senior editor, who recruited me and got the project started.
Thanks to Stewart Watkiss, my technical reviewer, who helped make this a
far better book.
xxi
Introduction
Everyone seems to carry a smartphone and/or a tablet. Nearly all of these
devices have one thing in common; they use an ARM central processing
unit (CPU). All of these devices are computers just like your laptop or
business desktop. The difference is that they need to use less power, in
order to function for at least a day on one battery charge, therefore the
popularity of the ARM CPU.
At the basic level, how are these computers programmed? What
provides the magical foundation for all the great applications (apps) that
run on them, yet use far less power than a laptop computer? This book
delves into how these are programmed at the bare metal level and provides
insight into their architecture.
Assembly Language is the native lowest level way to program a
computer. Each processing chip has its own Assembly Language. This
book covers programming the ARM 64-bit processor. If you really want to
learn how a computer works, learning Assembly Language is a great way to
get into the nitty-gritty details. The popularity and low cost of single board
computers (SBCs) like the Raspberry Pi and NVidia Jetson Nano provide
ideal platforms to learn advanced concepts in computing.
Even though all these devices are low powered and compact, they’re
still sophisticated computers with a multicore processor, floating-point
coprocessor, and a NEON parallel processing unit. What you learn about
any one of these is directly relevant to any device with an ARM processor,
which by volume is the number one processor on the market today.
xxiii
Introduction
In this book, we cover how to program all these devices at the lowest
level, operating as close to the hardware as possible. You will learn the
following:
xxiv
Introduction
xxv
CHAPTER 1
Getting Started
The ARM processor was originally developed by Acorn Computers in
Great Britain, who wanted to build a successor to the BBC Microcomputer
used for educational purposes. The BBC Microcomputer used the 6502
processor, which was a simple processor with a simple instruction set. The
problem was there was no successor to the 6502. The engineers working
on the Acorn computer weren’t happy with the microprocessors available
at the time, since they were much more complicated than the 6502, and
they didn’t want to make just another IBM PC clone. They took the bold
move to design their own and founded Advanced RISC Machines Ltd.
to do it. They developed the Acorn computer and tried to position it as
the successor to the BBC Microcomputer. The idea was to use reduced
instruction set computer (RISC) technology as opposed to complex
instruction set computer (CISC) as championed by Intel and Motorola.
We will talk at length about what these terms mean later.
Developing silicon chips is costly, and without high volumes,
manufacturing them is expensive. The ARM processor probably wouldn’t
have gone anywhere except that Apple came calling. They were looking
for a processor for a new device under development—the iPod. The key
selling point for Apple was that as the ARM processor was RISC, it used
less silicon than CISC processors and as a result used far less power. This
meant it was possible to build a device that ran for a long time on a single
battery charge.
2
Chapter 1 Getting Started
3
Chapter 1 Getting Started
4
Chapter 1 Getting Started
5
Chapter 1 Getting Started
• A text editor
6
Chapter 1 Getting Started
Text Editor
You will need a text editor to create the source program files. Any text
editor can be used. Linux usually includes several by default, both
command line and via the GUI. Usually, you learn Assembly Language
after you’ve already mastered a high-level language like C or Java. So,
chances are you already have a favorite editor and can continue to use it.
Specialty Programs
We will mention other helpful programs throughout the book that you can
optionally use, but aren’t required, for example:
7
Chapter 1 Getting Started
All of these are either open source or free, but there may be some
restrictions on where you can install them.
Now we will switch gears to how computers represent numbers. We
always hear that computers only deal in zeros and ones; now we’ll look at
how they put them together to represent larger numbers.
C
omputers and Numbers
We typically represent numbers using base 10. The common theory is we
do this, because we have ten fingers to count with. This means a number
like 387 is really a representation for
There is nothing special about using 10 as our base, and a fun exercise in
math class is to do arithmetic using other bases. In fact, the Mayan culture
used base 20, perhaps because we have 20 digits: ten fingers and ten toes.
Computers don’t have fingers and toes; rather, everything is a switch
that is either on or off. As a result, computers are programmed to use base
2 arithmetic. Thus, a computer recognizes a number like 1011 as
1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20
= 1 * 8 + 0 * 4 + 1 * 2 + 1
= 8 + 0 + 2 + 1
= 11 (decimal)
This is extremely efficient for computers, but we are using four digits
for the decimal number 11 rather than two digits. The big disadvantage for
humans is that writing, or even keyboarding, binary numbers is tiring.
8
Chapter 1 Getting Started
Since a byte holds 8 bits, it can represent 28 (256) numbers. Thus, the
byte e6 represents
e6 = e * 161 + 6 * 160
= 14 * 16 + 6
= 230 (decimal)
= 1110 0110 (binary)
9
Chapter 1 Getting Started
A handy tool is the Linux Gnome calculator (Figure 1-2). The Gnome
calculator has a nice programming mode which shows a number’s
representation in multiple bases at once. This calculator is installed in
Ubuntu Linux, if you are running the Gnome desktop. However, if you
don’t have it, it is easy to add. If you are running a Debian-derived Linux
like Ubuntu or Kali, to install it, use the command line:
10
Chapter 1 Getting Started
11
Chapter 1 Getting Started
CPU Registers
In all computers, data is not operated in the computer’s memory; instead
it’s loaded into a CPU register, then the data processing or arithmetic
operation is performed in the registers. The registers are part of the
CPU circuitry allowing instant access, whereas memory is a separate
component and there is a transfer time for the CPU to access it.
The ARM processor is based on a load-store architecture where there
are two basic types of instructions:
12
Chapter 1 Getting Started
We don’t always need the full 64 bits of data in a register. Often 32 bits
is fine. All the X registers can be operated on as 32-bit registers by referring
to them as W0–W30 and WZR. When we do this, the instruction will use
the lower 32 bits of the register and set the upper 32 bits to zero. Using 32
bits saves memory, since you only use 4 bytes rather than 8 bytes for each
quantity saved. Most loop counters and other common variables used in
programming easily fit in 4 bytes, so this is made easy by the processor.
There are a large set of registers for the coprocessors, but we’ll cover
these when we get to programming these coprocessors in Chapter 12,
“Floating-Point Operations,” and Chapter 13, “Neon Coprocessor.”
13
Chapter 1 Getting Started
To give you an idea for data processing instructions, let’s consider the
format for a common class of instructions that we’ll deal with early on.
Figure 1-3 shows the format of the instruction and what the bits specify.
14
Chapter 1 Getting Started
When things are running well, each instruction executes in one clock
cycle. An instruction in isolation takes three clock cycles, namely, one to
load the instruction from memory, one to decode the instruction, and
then one to execute the instruction. The ARM is smart and works on three
instructions at a time, each at a different step in the process, called the
instruction pipeline. If you have a linear block of instructions, they all
execute on average taking one clock cycle.
In modern ARM processors, the execution pipeline is much more
sophisticated and can be working on more than three instructions at
a time. Some instructions like integer division take longer, and if the
following instructions don’t rely on the result, then these instructions can
execute in parallel to the division process. Other instructions might stall,
for instance, when waiting for memory to be loaded, again the process
can perform other instructions that don’t depend on the result while
the memory controller fetches the memory—this is called out-of-order
execution.
15
Chapter 1 Getting Started
Computer Memory
Programs are loaded from the computer’s disk drive device into memory
and executed. The memory holds the program, along with any data or
variables associated with it. This memory isn’t as fast as the CPU registers,
but it’s much faster than accessing data stored on an SSD drive or CF card.
We’ve talked a lot about 64-bit mode, but what is it? What 64-bit mode
really means is
16
Chapter 1 Getting Started
The quick way to load memory that isn’t too far away from the program
counter (PC) register is to use the load instruction via the PC, since it
allows a 12-bit offset from the register. This looks like you can efficiently
access memory within 4096 words of the PC. Yuck, how would you write
such code? This is where the GNU Assembler comes in. It lets you specify
the location symbolically and will figure out the offset for you.
In Chapter 2, “Loading and Adding,” we will look at the immediate
operand in more detail. We will cover many more ways to specify memory
addresses in future chapters, like asking Linux to give us a block of
memory, returning the address in a register for us. For now, using the PC
with an offset meets our needs.
label: opcode operands
The label: part is optional and only required if you want the instruction
to be the target of a branch instruction.
There are quite a few opcodes; each one is a short mnemonic that is
human readable and easy for the Assembler to process. They include
• B for branch
There are quite a few different formats for the operands. We will cover
those as we cover the instructions that use them.
17
Chapter 1 Getting Started
H
ello World
In almost every programming book, the first program is a simple program
to output the string “Hello World.” We will do the same with Assembly to
demonstrate some of the concepts we’ve been talking about. In our favorite
text editor, let’s create a file “HelloWorld.s” containing the code in Listing 1-1.
//
// Assembler program to print "Hello World!"
// to stdout.
//
// X0-X2 - parameters to Linux function services
// X8 - Linux function number
//
.data
helloworld: .ascii "Hello World!\n"
18
Chapter 1 Getting Started
as -o HelloWorld.o HelloWorld.s
ld -o HelloWorld HelloWorld.o
These are the commands to compile our program. First, we must make
this file executable using the terminal command:
chmod +x build
Now, we can run it by typing ./build. If the files are correct, we can
execute our program by typing ./HelloWorld. In Figure 1-4, I used bash -x
(debug mode), so you can see the commands being executed.
19
Chapter 1 Getting Started
Notice how small these files are. The executable is only 1104 bytes, about
1 kilobyte. This is because there is no runtime, or any other libraries required
to run this program; it is entirely complete in itself. If you want to create very
small executables, Assembly Language programming is the way to go.
The format for this program is a common convention for Assembly
Language programs where each line is divided into these four columns:
• Opcode
• Operands
• Comment
About Comments
We start the program with a comment that states what it does. We also
document the registers used. Keeping track of which registers are doing
what becomes important as our programs get bigger.
20
Chapter 1 Getting Started
Where to Start
Next, we specify the starting point of our program:
21
Chapter 1 Getting Started
Assembly Instructions
We only use three different Assembly Language statements in this
example:
Data
Next, we have .data that indicates the following instructions in the data
section of the program:
22
Chapter 1 Getting Started
C
alling Linux
This program makes two Linux system calls to do its work. The first is the
Linux write to file command (#64). Normally, we would have to open a file
first before using this command, but when Linux runs a program, it opens
three files for it:
The Linux shell will redirect these when you use >, <, and | in your
commands. For any Linux system call, you put the parameters in registers
X0–X7 depending on how many parameters are needed. Then a return
code is placed in X0 (we should check this to see if an error occurred, but
we are bad and don’t do any error checking). Each system call is specified
by putting its function number in X8.
The reason we do a software interrupt rather than a branch or
subroutine call is so we can call Linux without needing to know where this
routine is in memory. This is rather clever and means we don’t need to
change any addresses in our program as Linux is updated and its routines
move around in memory. The software interrupt has another benefit of
providing a standard mechanism to switch privilege levels. We’ll discuss
Linux system calls later in Chapter 7, “Linux Operating System Services.”
23
Chapter 1 Getting Started
objdump -s -d HellowWorld.o
0000000000000000 <_start>:
0: d2800020 mov x0, #0x1 // #1
4: 580000e1 ldr x1, 20 <_start+0x20>
8: d28001a2 mov x2, #0xd // #13
c: d2800808 mov x8, #0x40 // #64
10: d4000001 svc #0x0
14: d2800000 mov x0, #0x0 // #0
18: d2800ba8 mov x8, #0x5d // #93
1c: d4000001 svc #0x0
24
Chapter 1 Getting Started
The top part of the output shows the raw data in the file including our
eight instructions, then our string to print in the .data section. The second
part is a disassembly of the executable .text section.
Let’s look at the first MOV instruction which compiled to 0xd2800020
(Figure 1-5).
• The last 5 bits are the register to load. These are 0 since
we are loading register X0.
ldr X1, =helloworld
to
ldr x1, 20 <_start+0x20>
25
Chapter 1 Getting Started
This is the Assembler helping you with the ARM processor’s obscure
mechanism of addressing memory. It lets you specify a symbolic address,
namely, “helloworld,” and translate that into an offset from the program
counter. Here the disassembler is trying to be helpful to indicate which
memory address will be loaded, rather than the exact Assembly code.
The details are a bit more complicated, and we’ll cover them in detail in
Chapter 5, “Thanks for the Memories.”
You might notice that the raw instructions in the top part of the output
have their bytes reversed, compared to those listed in the disassembly
listing. This is because we are using a little-endian encoding, which we will
cover in the next chapter.
S
ummary
In this chapter, we introduced the ARM processor and Assembly Language
programming along with why we want to use Assembly. We covered the
tools we will be using. We also saw how computers represent positive
integers.
We then looked at in more detail how the ARM CPU represents
Assembly instructions along with the registers it contains for processing
data. We introduced both the computer’s memory and the GNU Assembler
that will assist us in writing our Assembly Language programs.
Finally, we created a simple complete program to print “Hello World!”
in our terminal window.
In Chapter 2, “Loading and Adding,” we will look at loading data into
the CPU registers and performing basic addition. We’ll see how negative
numbers are represented and learn new techniques for manipulating
binary bits.
26
Chapter 1 Getting Started
Exercises
1. Convert the decimal number 1234 to both binary
and hexadecimal.
27
CHAPTER 2
N
egative Numbers
In the previous chapter, we discussed how computers represent positive
integers as binary numbers, called unsigned integers, but what about
negative numbers? Our first thought might be to make one bit represent
whether the number is positive or negative. This is simple, but it turns out
it requires extra logic to implement, since now the CPU must look at the
sign bits, then decide whether to add or subtract and in which order.
It turns out there is a simple representation of negative numbers that
works without any special cases or special logic; it is called two’s complement.
2N - number
where N is the number of bits in our integer. In our example, the two’s
complement of 1 is
This is why it’s called two’s complement. An easier way to calculate the
two’s complement is to change all the 1s to 0s and all the 0s to 1s and then
add 1. If we do that to 1, we get
0xFE + 1 = 0xFF
30
Other documents randomly have
different content
whole of New Zealand what it is as yet only in parts. Those parts are
rich farm lands, with swiftly scouting motor-cars used by great
capitalist-farmers who have more than one station to look after. It is
a strange phenomenon of New Zealand life that the small farm
towns are generally much more alert and progressive than the big
cities. The New Zealanders build houses that look like transplanted
suburbs from around New York, and bring to their villages some of
the love of plant life that the city-dweller is soon too sophisticated to
share. They draw out to themselves the moving-picture theaters,
which are now the all-possessing rage in the Dominion as elsewhere,
and read the latest periodicals with the interest of the townsman.
There are over a thousand newspapers in the Dominion, which for a
population of a million is a goodly number, though one cannot
regard this as too great an indication of the intellectual advancement
of the people. Yet literacy is the possession of the farmer as much as
and frequently more than the city-dweller in New Zealand. His
children go to school even if they have to use the trains to get there;
free railway passes on these are accorded by the Government. And
on the whole the farmer's life in New Zealand is richer than that of
most rural communities. But the struggle is still great. I have seen
some who do not feel that the promise is worth it.
Though each of the big cities in the Dominion has its own special
characteristics, they are all considerably alike. The three chief ones
are all port cities of about 80,000 inhabitants each, and except for
the fact that Dunedin in the far south is essentially Scotch and
somewhat more stolid than the rest, and Wellington in the center is
the capital of the Dominion and therefore suspicious, one may go up
and down their steep hills without any change in one's social gears.
The colonial atmosphere is at once charming and chilling. There is a
certain sobriety throughout which makes up for lack of the luxuries
of modern life. But one cannot escape the conviction that regularity
is not all that man needs. Everything moves along at the pace of a
river at low level,—broad, spacious, serene, but without hidden
places to explore or sparkling peaks of human achievement to
emulate. One paddles down the stream of New Zealand life without
the prospect of thrills. One might be transported from Auckland in
the north to Wellington or Dunedin in the south during sleep, and
after waking set about one's tasks without realizing that a change
had been made.
Every city is well lighted; good trams (trolley-cars) convey one in
all directions, but at an excessively high fare; the water and
sewerage systems are never complained of; the theaters are good
and the shops full of things from England and America. There are
even many fine motor-cars. But there are few signs of great wealth,
though comparatively big fortunes are not unknown. It is rumored
that ostentation is never indulged in, as the attitude of the people as
a whole is averse to it.
On the other hand, neither are there any signs of extreme
poverty, though it exists; and slums to harbor it. While the usual
evils of social life obtain, the small community life makes it
impossible for them to become rampant. Every one knows every one
else and that which is taboo, if indulged in, must be carried out with
such extreme secrecy as to make it impossible for any blemish to
appear upon the face of things.
In these circumstances, one is immediately classified and
accepted or rejected, according as one is or is not acceptable.
Having recognized certain outstanding features of the gentleman in
you, the New Zealander is Briton enough to accept you without
further ado. There is in a sense a certain naïveté in his measurement
of the stranger. He is frank in questioning your position and your
integrity, but shrinks from carrying his suspicions too far. He will ask
you bluntly: "Are you what you say you are?" "Of course I am," you
say. "Then come along, mate." But he does not take you very far,
not because he is niggardly, but because he is thrifty.
As a result of this New Zealand spirit I found myself befriended
from one end of New Zealand to the other by a single family, the
elder brother having given me letters of introduction to every one of
his kin,—in Hamilton, Palmerston North, Wellington, Christchurch,
and Dunedin. And with but two or three exceptions I have always
found New Zealanders generous and open-hearted. Wherever I
went, once I broke through a certain shyness and reserve, I found
myself part of the group, though generally I did not remain long,
because I felt that new sensations could not be expected.
My one great difficulty was in keeping from falling in love with
the New Zealand girls. Rosy-cheeked, sturdy, silently game and
rebellious, they know what it is to be flirtatious. For them there is
seldom any other way out of their loneliness. Only here and there do
parents think it necessary to give their daughters any social life
outside the home. In these days of the movies, New Zealand girls
are breaking away from knitting and home ties. But even then few
girls care to preside at representations of others' love-affairs without
the opportunity of going home and practising, themselves. Hence
the streets are filled with flirtatious maidens strolling four abreast,
hoping for a chance to break into the couples and quartets of young
men who choose their own manly society in preference to that of
expensive girls. I have seen these groups pass one another, up and
down the streets, frequent the tea-houses and soda fountains, carry
on their flirtations from separate tables, pay for their own
refreshments or their own theater tickets; but real commingling of
the sexes in public life is not pronounced.
At the beaches! That is different. There the dunes and bracken
are alive with couples all hours of the day or night during the holiday
and summer seasons. Thence emerge engagements and hasty
marriages, nor can parental watchfulness guard against it.
CHAPTER VII
THE S. S. AURORA
Just arrived at Port Chalmers, N. Z., from
the South Pole
MOUNT COOK OF THE NEW ZEALAND
ALPS IN SUMMER
I made friends with the mate and the chief engineer and gained
access to their superb collection of Emperor Penguin skins and an
unusual number of photographs. Months afterward they wanted four
men to complete the crew necessary for another journey south and I
was tempted to join them, but tallow and bladder and a repressed
pen were the negatives, while China and Japan were the positives.
So I sailed away with the rising sun in the direction of the great
West that is the Far East. Crisp and clear in the bright morning air
shone the towering peaks of the New Zealand Alps as I sailed
toward Australia and to Botany Bay,—not, however, without being
nearly wrecked in the fog which had gathered in Foveaux Strait,
which separates Steward Island from the South Island in New
Zealand. Bluff, the last little town in New Zealand, is said to have the
most southerly hotel in the world. I saw it.
4
On the afternoon of the following day a heavy wind or squall
came up. This time the ship did not defy it. No foolhardy resistance
here. The reefs are too near and they stretch for thirty miles
seaward. Again we anchored. The horizon contracted like a noose of
mist; it stifled one. The ship seemed to crouch beneath the winds.
An hour, and the anchor was heard being lifted and the propellers
were slowly revived to action. A little later we anchored again. A
light was hoisted to the stern mast and twilight lowered on a calm
gray sea. Distant little flat islands loomed through the mist. Two
sailing-vessels at anchor, moored in companionship, rested within an
inlet. A gentle swish, a murmur of human voices, and our little world
was swaying gently upon a curious world. And there we remained all
night.
As the sun gave notice of day, we moved off, and all day the sea
was so still that but for the vibration of the screws it would have
been hard to realize that the ship was in motion. Here we came to
where the jagged coastline has run down. Tiny islets, flat and low,
most of them but a landing-place for a few tropical trees. Summer
calm, with barely a ripple of the sea. That night we anchored again,
having come, it was said, to the most dangerous pass on the reefs.
Ten days after having left Sydney we arrived at the last port in
Australia, Thursday Island. A cloudy morning had turned clear for us,
but on ahead to the northwest hung heavy mists. Because of these,
I was later told by two soldiers on guard atop the mountain
fortification, they could not see us coming. They saw our smoke, but
the steamer was hidden from them by mist. Then suddenly we shot
into view. All the while we had been in the clearest sunshine, the sea
glassy and the flying-fish darting about. It was no place for speed.
We moved just fast enough to leave the scene undisturbed. And
thus we stole into Torres Straits.
Of all the numerous harbors I have entered in the Pacific, none,
with the exception of the Inland Sea in Japan, is more picturesque
than that at Thursday Island. Shelter, space, and depth, and
stillness! One's eyes sweep round this pearly promise with greed for
its beauty. Seventy-five sail-boats, their sailless masts swaying with
the swells, are anchored on the reefs. It is Sunday and they are at
rest, but what enchantment lies hid in those folded sails! I wish for
the power to utter some word which could put them to flight; but
that remains for Monday, when "the word" is spoken.
And on Monday, too, immediately upon leaving port at ten
o'clock, the ship's time was returned to standard time, leaving
Australia and its "bunkum" daylight-saving time behind. Thence we
lived again by "dinkum" time. The ship about-faced and left the
channel the same way it had entered, and shortly afterward we
struck across the Arafua Sea.
From that day until I reached Japan it was all I could do to keep
track of the seas we passed through,—Arafua, Banda, Molucca,
Celebes, Sulu, China, and the Inland Sea.
As we neared the equator again, there was nothing to disturb the
peaceful splendor of life, except the little hoodlums on board. About
sixty miles south of it a tiny creature, like a turtle, sailed along the
still surface; the flying-fish blistered the water, the scars broadened
and healed again just as the sportive amphibians pierced it and
disappeared. What a contrast to the albatross!
Then the miracle occurred. From the west, hidden from me by
the ship, the sun reached to the eastern clouds, dashing them with
pink and bronze and blue. I could not tell where the horizon went to,
and was roused to curiosity as to what kind of sunset could effect
such lovely tints. It wasn't a sunset, but a sunfall, a revelation.
Where suggestion through imitation glistened on the eastern side,
daring prodigality of color swept away emotion on the western side.
It was neither saddening nor joyous. It was a vision of a
consciousness in nature as full of character, as definitely meaningful
and emotional as a human face. There was something almost
terrifying in the expression of that sunset face. One could read into it
what one felt in one's own soul. And a little later a crescent moon
peeped over the horizon.
At about midnight of the seventeenth day after leaving Sydney
we crawled over the equator, and no home-coming ever meant more
to me than seeing the dipper again and the Northern stars. During
all those days nothing wildly exciting had happened at sea; but just
after we left the equator we passed a series of water-spouts—six in
all—which formed a semi-circle east, south, and west. The spout to
the east seemed to me to be at least two or three hundred feet
high, and tremendous in circumference. It drew a solid column of
water from the sea far into a heavy black cloud. On the sea beneath
it rose a flutter of water fully fifty feet high, black as the smoke
produced by a magician's wand. Weird and illusive, the giants
beggared description as they stalked away to the southeast, like
animated sky-scrapers.
Then we reached Zamboanga, the little town on the island of
Mindanao of the Philippines. From there, for twelve hours, we crept
long the coast till we entered Manila Harbor.
There remained but two days' voyage before I would reach Asia,
the object of my interest for years, and of all my efforts for two. But
it was not so easy as all that, for two days upon the China Sea are
worth a year upon the Atlantic. Riding a cyclone would be riding a
hobby-horse or a camel compared with the Yellow Sea, and though I
was the only passenger who missed only one meal during the whole
period, I was beaten by the seventy-three-year-old English captain,
—who managed all but half a meal. The sea would roll skyward as
though it were striving to stand on end and for a moment the ship
would lurch downward as though on a loop-the-loop. Sometimes it
seemed as though the world were turning completely over. Yet I was
told this was only normal, and that typhoons visit it with stated
regularity. The China Sea is "the very metropolis of typhoons."
A month had well-nigh gone before we reached Hong-Kong, the
British portal to Cathay, a month of dreamy weather. Only one thing
more,—a thing more like a scene in the Arabian Nights. Toward the
end of the journey I discovered where the five hundred Chinese
whose noses had been counted when we left Sydney had gone.
Going forward, I looked over into an open hatchway, down into the
hold, and there was a sight I shall never forget. These hundreds of
deck passengers were all in a muddle amid cargo, parcels, hundreds
of birds in cages, parrots, a kangaroo,—yet oblivious of everything.
For the entire voyage nothing that I tell of could possibly have come
within their ken, as during those days their minds were bent on one
thing and one alone,—on playing fan-tan. There in the bottom of the
hold hundreds of gold sovereigns passed from hand to hand in a
game of chance. And at last they were to be released, to spread, a
handful of sand thrown back upon the beach.
As for myself, with my arrival at Hong-Kong and a visit to
Shanghai ended the longest continuous voyage I had made upon the
Pacific, and the second side of that great Pacific Triangle was drawn.
But meanwhile let me review in detail the outposts of the white man
in the far Pacific—the lands I had passed on the white man's side of
the triangle, ending in Hong-Kong, where white man and Oriental
meet.
CHAPTER VIII
1
In the normal course of human variation, there should have been
virtually no change of experience for me in going from New Zealand
to Australia, notwithstanding the twelve hundred miles of sea that
separate them. And though the sea is hardly responsible, there was
a difference between these two offshoots of the "same" race for
which distance offers little explanation. To me it seemed that
regardless of the pride of race which encourages people to vaunt
their homogeneity, the way these two counterparts of Britain have
developed proves that homogeneity exists in wish more than in fact.
It seems to me that the New Zealander has developed as though he
were more closely related to the insular Anglo-Saxon, and the
Australian as though he were the continental strain in the
Englishman cropping out in a new and vast continent. However, this
is sheer conjecture. All I can do is to offer in the form of my own
observations reasons for the faith that is in me.
From the moment that I set foot in Australia I felt once again on
a continent. Melbourne is low, flat, and gave me the impression of
roominess which New Zealand cities never gave. They, with the
exception of Christchurch on the Canterbury plains, always
clambered up bare brown hills and hardly kept from slipping down
into the sea. But in Australia I felt certain that if I set out in any
direction except east I could walk until my hair grew gray without
ever coming across a mountain. It was a great satisfaction to me
that first day, for it was intensely hot and I had a heavy coat on my
arm and two cameras and no helmet. Added to my difficulties was
the cordiality of an Australian fellow-passenger who was determined
that I should share with him his delight at home-coming. He was a
short, stout, olive-skinned young man of about twenty-three who
had a slightly German swing in his gait and accentuated his every
statement with a diagonal cut outward of his right hand, palm down.
ONE OF THE OLDEST AUSTRALIAN
RESIDENCES IS NOW A PUBLIC DOMAIN
A. A. White, Brisbane
AUSTRALIAN BLACKS IN THEIR NATIVE
ELEMENT
ebookbell.com