Serial Boot Loader


The Serial Boot Loader is the first piece of software that must be executed in the cold boot cycle. Being short it is easily "toggled" in using the Altair’s front panel switches - the true experience!  Once entered the program should be started, stopped, and then re-started. This is recommended because the Serial Boot Loader is a “blind” loader program; that is, it transfers any data read from the serial port directly in to memory for later use. The start, stop, re-start ensures that any stray characters left in the UARTS of the Altair or the PC are consumed before the actual cold boot process is started. Now with the Serial Boot Loader running it’s time to move to the APE program running on the PC.  (See Booting from APE)

The Serial Boot Loader in hexadecimal:

Addr.

Code

Label

Instruction

Operand

Comment

0100

 

 

ORG

0100H

;START IN PAGE 1

0100

3E03

SBOOT:

MVI

A,URESET

;CLEAR M6850 UART

0102

D312

 

OUT

SIO1

 

0104

3E15

 

MVI

A,U8D1SN

;8 DATA, 1 STOP, NO PARITY

0106

D312

 

OUT

SIO1

 

0108

210000

ABOOT:

LXI

H,0

;[H,L]=>LOAD ADDRESS

010B

0E80

 

MVI

C,080H

;[C]=LOAD COUNTER

010D

DB12

APEIN:

IN

SIO1

;CHARACTER FROM APE?

010F

E601

 

ANI

RXRDY

 

0111

CA0D01

 

JZ

APEIN

;NO - TRY AGAIN

0114

DB13

 

IN

SIO1+1

;YES - SAVE IT

0116

77

 

MOV

M,A

 

0117

23

 

INX

H

;INCREMENT LOAD ADDRESS

0118

0D

 

DCR

C

;DECREMENT LOAD COUNT

0119

C20D01

 

JNZ

APEIN

;DONE?  NO - CONTINUE

011C

C30000

 

JMP

0

;START COLD BOOT LOADER AT 0

The Serial Boot Loader in hexadecimal as a text file.

For those of you who prefer octal - which is better used with the switch layout of an Altair's front panel:

Addr.

Code

Label

Instruction

Operand

Comment

400

 

 

ORG

256

;START IN PAGE 1

400

076

003

SBOOT:

MVI

A,URESET

;CLEAR M6850 UART

402

323

022

 

OUT

SIO1

 

404

076

025

 

MVI

A,U8D1SN

;8 DATA, 1 STOP, NO PARITY

406

323

022

 

OUT

SIO1

 

410

041

000

000

ABOOT:

LXI

H,0

;[H,L]=>LOAD ADDRESS

413

016

200

 

MVI

C,128

;[C]=LOAD COUNTER

415

333

022

APEIN:

IN

SIO1

;CHARACTER FROM APE?

417

346

001

 

ANI

RXRDY

 

421

312

015

001

 

JZ

APEIN

;NO - TRY AGAIN

424

333

023

 

IN

SIO1+1

;YES - SAVE IT

426

167

 

MOV

M,A

 

427

043

 

INX

H

;INCREMENT LOAD ADDRESS

430

015

 

DCR

C

;DECREMENT LOAD COUNT

431

302

015

001

 

JNZ

APEIN

;DONE?  NO - CONTINUE

434

303

000

000

 

JMP

0

;START COLD BOOT LOADER AT 0

The Serial Boot Loader in octal as a text file.