1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-25 18:33:11 +00:00

6809: updated lwasm for raw targets (.asm extension)

This commit is contained in:
Steven Hugg 2022-02-14 20:35:42 -06:00
parent 1a062650ad
commit 4f05ea487b
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1 @@
williams

View File

@ -132,9 +132,11 @@ export function assembleLWASM(step: BuildStep): BuildStepResult {
gatherFiles(step, { mainFilePath: "main.s" });
var objpath = step.prefix + ".o";
var lstpath = step.prefix + ".lst";
const isRaw = step.path.endsWith('.asm');
if (staleFiles(step, [objpath, lstpath])) {
var objout, lstout;
var args = ['-9', '--obj', '-I/share/asminc', '-o' + objpath, '-l' + lstpath, step.path];
var args = ['-9', '-I/share/asminc', '-o' + objpath, '-l' + lstpath, step.path];
args.push(isRaw ? '-r' : '--obj');
var LWASM: EmscriptenModule = emglobal.lwasm({
instantiateWasm: moduleInstFn('lwasm'),
noInitialRun: true,
@ -153,6 +155,11 @@ export function assembleLWASM(step: BuildStep): BuildStepResult {
lstout = FS.readFile(lstpath, { encoding: 'utf8' });
putWorkFile(objpath, objout);
putWorkFile(lstpath, lstout);
if (isRaw) {
return {
output: objout
};
}
}
return {
linktool: "lwlink",

View File

@ -127,9 +127,17 @@ var PLATFORM_PARAMS = {
data_start: 0x9800,
data_size: 0x2800,
stack_end: 0xc000,
//extra_compile_args: ['--vectrex'],
extra_link_files: ['williams.scr', 'libcmoc-crt-vec.a', 'libcmoc-std-vec.a'],
extra_link_args: ['-swilliams.scr', '-lcmoc-crt-vec', '-lcmoc-std-vec'],
extra_compile_files: ['assert.h','cmoc.h','stdarg.h','vectrex.h','stdlib.h','bios.h'],
},
'williams-defender': {
arch: '6809',
code_start: 0x0,
rom_size: 0xc000,
data_start: 0x9800,
data_size: 0x2800,
stack_end: 0xc000,
},
'williams-z80': {
arch: 'z80',