The assembler currently supports creating raw binaries, with org sections determining where data/instructions should be placed. But I also want the assembler to support creating programs and libraries that can be loaded by the kernel.
The assembler should be updated to support different assembly modes.The way to support this will be for every assembler file to have a mode directive: .bin, .program or .library
.bin is the currently supported mode, so existing assembly files would only have to include the .bin directive at the beginning.
.program will require a symbol (label) right after it to indicate the start point of the program. .org sections are not allowed in a .program file and it can't be used in an include statement.
.library works similarly to .program except it can't be assembled to a binary and must instead be included by other .program or .bin files. Only symbols prefixed with @func or @data will be visible when included.
The assembler currently supports creating raw binaries, with org sections determining where data/instructions should be placed. But I also want the assembler to support creating programs and libraries that can be loaded by the kernel.
The assembler should be updated to support different assembly modes.The way to support this will be for every assembler file to have a mode directive: .bin, .program or .library
.bin is the currently supported mode, so existing assembly files would only have to include the .bin directive at the beginning.
.program will require a symbol (label) right after it to indicate the start point of the program. .org sections are not allowed in a .program file and it can't be used in an include statement.
.library works similarly to .program except it can't be assembled to a binary and must instead be included by other .program or .bin files. Only symbols prefixed with @func or @data will be visible when included.