noft Manual (G06.26+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction
- 2 noft Utility
- 3 noft Options
- Break Key
- ! (Exclamation Point)
- CD
- COMMENT
- DUMPADDRESS or DA
- DUMPOFFSET or DO
- DUMPPROC or DP
- DYNSTR2
- ENV
- EXIT or E
- FC
- FILE or F
- HELP or ?
- HISTORY or H
- LAYOUT
- LIBLIST
- LISTATTRIBUTE or LA
- LISTCOMPILERS or LC
- LISTOPTIMIZE or LO
- LISTPROC or LP
- LISTSOURCE or LS
- LISTSRLEXPORTS or LLE
- LISTSRLFIXUPS or LLF
- LISTSRLINFO or LLI
- LISTUNREFERENCED or LUR
- LISTUNRESOLVED or LU
- LOG
- OBEY
- OUT
- QUIT or Q
- RESET
- SET
- SHOW
- SYSTEM or VOLUME
- XREFPROC or XP
- 4 noft Diagnostic Messages
- 5 ar Utility
- 6 ar Diagnostic Messages
- A Sample nld and noft Session
- B Converting From Binder to noft
- C Native Object File Structure
- Glossary
- Index

Sample nld and noft Session
noft Manual—528273-001
A-4
Source Module MODULE1C
The wrap-up function displays the number of passengers on the bus at the last stop
and goes through the bus stop array, printing the number of people left at each stop.
The bus stop array is then freed.
Example A-6. Source Module MODULE1C With Edit Line Numbers
.1 #pragma nolist
1 #include <stdlibh>
1.001 #include <stdioh>
1.01 #pragma list
1.011 #include "globals.h"
1.1 #include "module1.h"
1.2 #include "util.h"
2
3 void initialize(long stops)
4 {
4.01 long counter;
4.02 long passenger_count;
4.1
5 bus_stop_array = (long *)malloc(stops*sizeof(long));
5.1 seed_random_number();
6 for (counter = 0; counter < stops; counter++)
6.01 {
6.02 passenger_count = 0x7F & rand();
6.03 while (passenger_count > BUS_STOP_CAPACITY)
6.04 passenger_count = 0x7F & rand();
6.05
6.1 bus_stop_array[counter] = passenger_count;
7 }
8 } /* initialize */
9
17 void wrapup(long stops)
18 {
19 long counter;
19.01
19.1 printf("Number of people on bus at last stop = %d.\n",
19.11 passengers_on_bus);
19.2 printf("\nPassengers remaining at each bus stop.\n");
19.3 printf("Bus Stop Passenger Count\n");
20 for (counter = 0; counter < stops; counter++)
20.1 {
20.2 printf("%4d %4d\n", (counter + 1), bus_stop_array[counter]);
20.3 }
20.4 free(bus_stop_array);
21
22
23 } /* wrapup */