Skip to main content
added 123 characters in body
Source Link
Brian H
  • 61.5k
  • 20
  • 207
  • 366

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3. The end of the BASIC program is indicated when the pointer to the next line equals $0000. That is, three nulls in a row.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Notes:

  1. On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed.

  2. Interestingly, the Commodore disk drives, which return a directory listing in the format of a BASIC program (i.e. LOAD "$",8), always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Notes:

  1. On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed.

  2. Interestingly, the Commodore disk drives, which return a directory listing in the format of a BASIC program (i.e. LOAD "$",8), always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3. The end of the BASIC program is indicated when the pointer to the next line equals $0000. That is, three nulls in a row.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Notes:

  1. On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed.

  2. Interestingly, the Commodore disk drives, which return a directory listing in the format of a BASIC program (i.e. LOAD "$",8), always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

added 16 characters in body
Source Link
Brian H
  • 61.5k
  • 20
  • 207
  • 366

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

NoteNotes: On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed. Interestingly, the Commodore disk drives, which return a directory listing as a BASIC program, always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

  1. On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed.

  2. Interestingly, the Commodore disk drives, which return a directory listing in the format of a BASIC program (i.e. LOAD "$",8), always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Note: On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed. Interestingly, the Commodore disk drives, which return a directory listing as a BASIC program, always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Notes:

  1. On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed.

  2. Interestingly, the Commodore disk drives, which return a directory listing in the format of a BASIC program (i.e. LOAD "$",8), always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

added 16 characters in body
Source Link
Brian H
  • 61.5k
  • 20
  • 207
  • 366

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801$0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401$0401 and the C128 starts at $1C01$1C01.

Note: On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed. Interestingly, the Commodore disk drives, which return a directory listing as a BASIC program, always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Trust Vice.

The information you obtained elsewhere is incorrect. Each line of the BASIC program is preceded by a pointer to the next line. Then, comes the line number.

Following this is the tokens that make up the actual BASIC code of the line, and terminated by a null ($00). Then starts the next line (#2) with a pointer to line #3.

Technically, your BASIC program actually starts at $0801, as that is the location of the low-byte of the first pointer to the next line (line #2).

This is the start of BASIC for the C64. The VIC-20 and PET start at $0401 and the C128 starts at $1C01.

Note: On the VIC-20, the start of BASIC actually moves around, depending on expansion memory being installed. Interestingly, the Commodore disk drives, which return a directory listing as a BASIC program, always use $0401 as the base, and this behavior dates back to the PET. However, later Commodore kernals "fix-up" the directory listing to move it to the start of BASIC for that machine.

Source Link
Brian H
  • 61.5k
  • 20
  • 207
  • 366
Loading