ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

AN HC11 FILE MANAGER


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

AN HC11 FILE MANAGER

Lessons from the Trenches 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.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ