; E06-S03: interface method table fixture in x128. ; ; The fixture fills the real parser tables (tb_set) with two interfaces and two ; classes, supplies method addresses, and runs src/compiler/iftables.s: ; ; IFOO slots: 0 ALPHA, 1 BETA IBAR slots: 0 ALPHA (same signature) ; A implements IFOO, IBAR B implements IFOO ; ; It checks: ; - one table per implemented interface, in implements order, slots in ; interface order, two bytes per slot; ; - class B emits its own distinct table; ; - A's single ALPHA method fills IFOO slot 0 and IBAR slot 0; ; - a missing address is IT_ERR_UNSET and leaves no table or watermark change; ; - a table that cannot fit the buffer is IT_ERR_SPACE, also rolled back; ; - the MAP gains one TABLE record per table with its address and slots. ; ; MB_DATA flags 0..7 report the eight phases; MB_ADDR holds the last step. .setcpu "6502" .include "../../src/common/c128.inc" .include "../../src/common/mailbox.inc" .include "../../src/common/formats.inc" .include "../../src/common/parser.inc" .include "../../src/common/iftables.inc" .import mmu_init, mmu_bank0, mmu_shutdown .import out_begin, out_startup, out_finish, out_abort .import out_load, out_entry, out_err, out_table_count .import out_table, out_table_iface, out_table_iface_len .import out_table_addr, out_table_slots, out_table_data .import tb_get, tb_set .import it_begin, it_set_addr, it_class, it_find .import it_error, it_count, it_used, it_data .import it_class_ids, it_iface_ids, it_table_addrs, it_slots, it_offsets TABLE_BASE = $B000 .macro STEP n lda #n sta MB_ADDR .endmacro .macro TBSET col, row, val lda #col ldy #row ldx #val jsr tb_set .endmacro .macro SETADDR label, row lda #