-
Notifications
You must be signed in to change notification settings - Fork 174
nbdir
suborb edited this page May 10, 2017
·
2 revisions
/*
* Example of advanced use of the NewBrain specific functions
* Display disk directory in expanded NewBrain
*/
#include `<stdio.h>`
#include `<newbrain.h>`
#include `<string.h>`
#define NBCHAN 100
main()
{
char buf[150];
/* Open the directory device on stream 15 */
nb_open( OUTP, NBCHAN, DEV_SDISCIO, 0, "" );
/* send 'DIR' command (3) for 'A:*.*' to directory device */
nb_puts( NBCHAN, "3A:*.*\n" );
while (strlen( nb_gets(NBCHAN, buf) )>0) {
printf ("%s\n",buf);
nb_puts( NBCHAN, "4"); /* ask for next item */
}
nb_close( NBCHAN );
}
- Overview
- Platform List
- Unsupported Platforms
- i8080/5 Support
- Homebrew hardware quickstart
- Retargetting
- Building the libraries
- Clang support
- Pragmas
- Adding to Classic
- Introduction
- Library Configuration
- CRT
- Header Files
- Assembly Language
- Library in Depth
- Embedded Platform
- Adding to NewLib
- Benchmarks
- Datatypes
- Debugging
- Decompression
- More than 64k
- Deficiencies
- Compiling Larger Applications
- Importing routines written in 8080 assembly mnemonics
- Using CP/M libraries in REL format with z88dk
- Writing optimal code
- Speeding up Compilation
- CMake usage