small fixes

This commit is contained in:
Piotr Jaczewski 2020-09-27 21:24:00 +02:00
parent 0bd0a220b3
commit 65b2c0371f
3 changed files with 22 additions and 11 deletions

View File

@ -10,7 +10,7 @@ if __name__ == "__main__":
def print_row(offset, row_data): def print_row(offset, row_data):
print(hex(offset)[2:].upper() + ': ' + " ".join(row_data)) print(hex(offset)[2:].upper() + ': ' + " ".join(row_data))
row_offset = int(sys.argv[1], 0) row_offset = int(sys.argv[1], 16)
row = list() row = list()
with open(sys.argv[2], 'rb') as file: with open(sys.argv[2], 'rb') as file:
byte = file.read(1) byte = file.read(1)

View File

@ -38,6 +38,9 @@
start start
; clear decimal mode
cld
; enable rom bank ; enable rom bank
sta rom_bank sta rom_bank

View File

@ -6,6 +6,12 @@ rom_content = $4800
number_of_entries .byt $05 number_of_entries .byt $05
/*
How to store INTEGER BASIC programs?
C100R
004A.00FFW 0800.0FFFW
E2B3R - warm entry point
*/
basic basic
basic_seg .byt $01 basic_seg .byt $01
basic_len .word $1000 basic_len .word $1000
@ -22,19 +28,20 @@ apple30th_cont_start .word apple30th_cont
apple30th_str .byt $13,"APPLE 30TH BIRTHDAY" apple30th_str .byt $13,"APPLE 30TH BIRTHDAY"
apple30th_jmp_addr .word $0280 apple30th_jmp_addr .word $0280
/* 00: <start_low_byte> <start_high_byte> <end_low_byte> <end_high_byte> */
/* test address expected actual */
/* /*
0 - All zeros - each byte of memory is verified that a 0x00 value can be written and read 00: <start_low_byte> <start_high_byte> <end_low_byte> <end_high_byte>
1 - All ones - each byte of memory is verified that a 0xff value can be written and read test address expected actual
2 - Floating ones - eight passes, starting with 0x01 and moving the 1 bit to left each succeeding pass
0 - All zeros - each byte of memory is verified that a 0x00 value can be written and read
1 - All ones - each byte of memory is verified that a 0xff value can be written and read
2 - Floating ones - eight passes, starting with 0x01 and moving the 1 bit to left each succeeding pass
0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x02 0x04 0x08 0x10 0x20 0x40 0x80
3 - Floating zeros - eight passes, starting with 0x7f and shifting the 0 bit to the right each succeeding pass 3 - Floating zeros - eight passes, starting with 0x7f and shifting the 0 bit to the right each succeeding pass
0xBF 0xDF 0xEF 0xF7 0xFB 0xFD 0xFE 0xBF 0xDF 0xEF 0xF7 0xFB 0xFD 0xFE
4 - Address in Address 1 - one pass with low eight bits of the locations address is written to that location 4 - Address in Address 1 - one pass with low eight bits of the locations address is written to that location
if this fails, you have a problem with one of the low eight address lines (this is pretty unlikely to fail, if this fails, you have a problem with one of the low eight address lines (this is pretty unlikely to fail,
since you need these address lines in order to load and run this program) since you need these address lines in order to load and run this program)
5 - Address in Address 2 - one pass with high eight bits of the locations address written to that location 5 - Address in Address 2 - one pass with high eight bits of the locations address written to that location
if this fails, you have a problem with one of the eight high address lines if this fails, you have a problem with one of the eight high address lines
*/ */
memorytest memorytest
@ -48,8 +55,9 @@ memorytest_2_cont_start .word memorytest_cont+16
memorytest_str .byt $10,"MEMORY TEST 280R" memorytest_str .byt $10,"MEMORY TEST 280R"
memorytest_jmp_addr .word $FF1F memorytest_jmp_addr .word $FF1F
/* 44: <low_byte> <high_byte> */ /*
44: <low_byte> <high_byte> - disassembler start address
*/
disassembler disassembler
disassembler_seg .byt $01 disassembler_seg .byt $01
disassembler_1_len .word $0200 disassembler_1_len .word $0200