getting assembler working

This commit is contained in:
John Bintz 2023-12-15 13:27:53 -05:00
parent adc1e73777
commit 89147083a0
3 changed files with 54 additions and 15 deletions

BIN
asmtest Normal file

Binary file not shown.

30
asmtest.asm Normal file
View File

@ -0,0 +1,30 @@
FUNC_CNT SET -30
FUNCDEF MACRO
_LVO\1 EQU FUNC_CNT
FUNC_CNT SET FUNC_CNT-6
ENDM
INCDIR "devpac:include/"
INCLUDE "exec/exec_lib.i"
INCLUDE "exec/libraries.i" # get the CALLLIB macro
INCLUDE "dos/dos_lvo.i"
MOVE.L #DOSLibrary,A1
MOVE.L #36,D0
MOVEA.L 4,A6
CALLLIB _LVOOpenLibrary
MOVE.L D0,DOSBase
MOVE.L #Wow,D1
MOVEA.L DOSBase,A6
CALLLIB _LVOPutStr
MOVEA.L DOSBase,A1
MOVEA.L 4,A6
CALLLIB _LVOCloseLibrary
RTS
DOSBase DCB.L 1,0
DOSLibrary DC.B "dos.library",0
Wow DC.B "wow",10,0

View File

@ -4,24 +4,33 @@
#include <graphics/gfxbase.h> #include <graphics/gfxbase.h>
#include <hardware/custom.h> #include <hardware/custom.h>
#include <hardware/dmabits.h> #include <hardware/dmabits.h>
#include <exec/memory.h>
#include "old_hardware_setup.h" #include "old_hardware_setup.h"
extern struct GfxBase *GfxBase; extern struct GfxBase *GfxBase;
extern far struct Custom custom; extern far struct Custom custom;
int main(void) { int main(void) {
struct OldHardwareSetup oldHardwareSetup; struct OldHardwareSetup oldHardwareSetup;
oldHardware_takeOver(&oldHardwareSetup); void *copperlist;
UWORD *copperlist_ptr;
custom.dmacon = DMAF_SETCLR | DMAF_COPPER | DMAF_RASTER; APTR *bitplane;
custom.dmacon = DMAF_AUDIO | DMAF_DISK | DMAF_SPRITE | DMAF_BLITTER;
oldHardware_takeOver(&oldHardwareSetup);
// set up a two bitplane display
// create a copperlist custom.dmacon = DMAF_SETCLR | DMAF_COPPER | DMAF_RASTER;
// how do you write fonts to a bitpane? custom.dmacon = DMAF_AUDIO | DMAF_DISK | DMAF_SPRITE | DMAF_BLITTER;
// set up a two bitplane display
oldHardware_giveBack(&oldHardwareSetup); // create a copperlist
// how do you write fonts to a bitpane?
copperlist = AllocMem(21000, MEMF_CHIP | MEMF_CLEAR);
FreeMem(copperlist, 21000);
oldHardware_giveBack(&oldHardwareSetup);
} }