HEADER

From C64-Wiki
Jump to navigationJump to search
BASIC keyword
Keyword: HEADER
Abbreviation: HE Shift+A
Type: Command
Token code: UNK
Handling routine
in BASIC ROM:
UNK
List of all BASIC keywords


Remark: This article describes the BASIC command HEADER in Commodore BASIC V3.5 or higher.

Type: Command
General Programming-Syntax: HEADER <diskname> [,I <i.d.>] ,D<drive number> [,[ON] U<device number>]

HEADER is a BASIC 3.5 command that is used to format a diskette for new use, or completely erase an entire diskette.
In direct mode the action is preceded by an interactive request for acknowledgment:

ARE YOU SURE?

Any input not starting with "Y" aborts the command.

Before you can use a new diskette for the first time, you must format it with the HEADER command. If you want to erase an entire diskette for reuse, you can use the HEADER command.

The command divides the disk into sections called blocks, and it creates a table of contents, called a directory or catalog, on the disk.

The diskname can be any name up to 16 charcters long.

The i.d. number is any 2 charcters. Give each disk a unique I.D. number.

Be careful when you HEADER a disk because the HEADER command erases all stored data.

Giving no I.D. number allows you to perform a quick header. The old I.D. number is used. You can only use the quick header method if the disk was previously formatted, since the quick header only clears out the directlry rather than formatting the disk.

Device number defaults to 8 if no device number is specified.

Drive number must be specified. A single drive unit has only D0.

Examples[edit | edit source]

Formats new disk in drive 0 of floppy device 8:

HEADER "GAME DISK",IGD,D0

Formats new disk in drive 0 of floppy device 8:

HEADER "GAME DISK",IGD,D0,U8

Formats new disk in drive 0 of floppy device 8:

HEADER "GAME DISK",IGD,D0,ON U8

Quick header of an already formatted disk in drive 0 of floppy device 8:

HEADER "DEV DISK",D0

Quick header of an already formatted disk in drive 0 of floppy device 8:

HEADER "DEV DISK",D0,U8
BASIC V3.5 Commands

ABS | ASC | ATN | AUTO | BACKUP | BOX | CHAR | CHR$ | CIRCLE | CLOSE | CLR | CMD | COLLECT | COLOR | CONT | COPY | COS | DATA | DEC | DEF | DELETE | DIM | DIRECTORY | DLOAD | DO | DRAW | DSAVE | END | ERR$ | EXP | FN | FOR | FRE | GET | GET# | GETKEY | GOSUB | GOTO | GRAPHIC | GSHAPE | HEADER | HELP | HEX$ | IF | INPUT | INPUT# | INSTR | INT | JOY | KEY | LEFT$ | LEN | LET | LIST | LOAD | LOCATE | LOG | MID$ | MONITOR | NEW | NEXT | ON | OPEN | PAINT | PEEK | POKE | POS | PRINT | PRINT USING | PRINT# | PUDEF | RCLR | RDOT | READ | REM | RENAME | RENUMBER | RESTORE | RESUME | RETURN | RGR | RIGHT$ | RLUM | RND | RUN | SAVE | SCALE | SCNCLR | SCRATCH | SGN | SIN | SOUND | SPC | SQR | SSHAPE | STOP | STR$ | SYS | TAB | TAN | TRAP | TROFF | TRON | USR | VAL | VERIFY | VOL | WAIT