;Altair 4K Basic loader ;Version 1.0 ;JWD 05/24/2024 CPU 8080 ;Specify architecture PAGE 0 ;No page breaks ORG 09000H ; Copy the Altair 4K Basic code to RAM0 LXI H,8000H ;start of Altair 4K Basic code LXI D,0 ;start of initial RAM0 LXI B,1ED2H ;number of bytes I10: MOV A,M ;Get program byte of Altair 4K Basic STAX D ;Store it in destination RAM INX H ;Point to next Altair 4K Basic byte INX D ;Point to next destination byte DCR C ;Count down LSB JNZ I10 ;If not zero, do again DCR B ;Count down MSB JNZ I10 ;If not zero, do again from the top I20: MOV A,M ;Now for the last page STAX D ;Save it INX H ;Point ahead to next Altair 4K Basic byte INX D ;Same thing for destination DCR C ;Count down LSB JNZ I20 ;If not zero, do again MOV A,M ;Don't forget the last byte STAX D ;Save it RST 0 ;Start Altair 4K Basic END ;Don't forget that if you commit Basic to ROM without the ;monitor, you have to include SIO initialization or it probably ;won't work.