|
Part 2ýAll of the Details
by Walter Krawec
Introduction
ý Format() ý Install()
ý Directory() ý Run()
ý Menu() ý Saving
Memory ý Interfacing to the File Manager
ý Two Sample Programs ý Conclusion
ý Sources and PDF
FORMAT()
The Format() procedure is simple. First,
it warns you that formatting will erase all programs with the message
Erase all files?[y/n]:. Then it waits for you to answer either
"y" or "n." A small loop waits until a character
is received from the SCI, then OutCh() echoes the character back.
If you type "y," a zero is
stored at address prg_addr. Doing so tells the file manager that there
are no programs installed. The file manager also resets the address
prg_addrý2. This address holds the next available memory address in
the program information block of memory. The Format() procedure sets
this to prg_addr+2, which points to the address after the total number
of programs definition.
If you hit something other than "y,"
it prints a new line and exits.
PREVIOUSý
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |