Figure 2-3. Sample Program Listing (Cont'd) - HP 64700 Series User Manual

64000-ux case solutions for microprocessors, softkey interface
Hide thumbs Also See for 64700 Series:
Table of Contents

Advertisement

57
00000056 C1FC 4E6D
58
0000005A 2040
59
0000005C 41E8 0339
60
00000060 2008
61
00000062 23C0 0000 0100
62
00000068 4240
63
0000006A 4840
64
0000006C 0280 0000 00FF
65
00000072 4E75
66
67
68
69
70
71
00000000
72
73
74
75
76
00000100 0000 0001
77
00000104
78
000001FC
79
R
*********************************************
* Random numbers written to this area.
*********************************************
RESULTS
*********************************************
* Variable used in RAND subroutine and
* stack area.
*********************************************
RAND_SEED
STACK

Figure 2-3. Sample Program Listing (Cont'd)

The sample program is assembled and linked with the following
HP 64870 68000/10/20 Assembler/Linker/Librarian commands
(which assume that /usr/hp64000/bin is defined in the PATH
environment variable):
$ as68k -Lh anly.s > anly.lis <RETURN>
$ ld68k -c anly.k -Lh > anly.map <RETURN>
The linker command file, anly.k, contains the information below.
name anly
sect PROG=400h
sect DATA=500h
load anly.o
end
MULS.W
#4E6DH,D0
MOVEA.L D0,A0
LEA
339H(A0),A0
MOVE.L
A0,D0
MOVE.L D0,RAND_SEED
CLR.W
D0
SWAP
D0
ANDI.L #000000FFH,D0
RTS
SECT
DATA,,D
DS.B
100H
DC.L
1
DS.L
3EH
DS.W
2
END
START
Getting Started 2-5

Advertisement

Table of Contents
loading

Table of Contents