I'm just starting out here. Is there a way to use a block of assembly code in the BASIC program? I tried to include it, but that doesn't seem to be the way. I am using Crimson Editor with GCBASIC.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If it's only a few lines (ie. less than an entire subroutine), then you can just put the assembly code in amongst the GCBASIC code. GCBASIC will recognise it and pass it straight through to the assembler.
If you're trying to paste in several assembly subroutines, you'll need to mark the start and end of each assembly subroutine by adding "Sub somename" before each assembly sub, and "End Sub" after each one.
#include doesn't work the same way in GCBASIC as it does in other languages - it just tells GCBASIC to load the subroutines and constants in the included file after it's finished reading the current file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK so basically I need to paste the asm code directly into the BASIC code. I thought there might be a way to link to .asm files that had a definition or subroutine structure.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm just starting out here. Is there a way to use a block of assembly code in the BASIC program? I tried to include it, but that doesn't seem to be the way. I am using Crimson Editor with GCBASIC.
Thanks
How big is the block of assembly code?
If it's only a few lines (ie. less than an entire subroutine), then you can just put the assembly code in amongst the GCBASIC code. GCBASIC will recognise it and pass it straight through to the assembler.
If you're trying to paste in several assembly subroutines, you'll need to mark the start and end of each assembly subroutine by adding "Sub somename" before each assembly sub, and "End Sub" after each one.
#include doesn't work the same way in GCBASIC as it does in other languages - it just tells GCBASIC to load the subroutines and constants in the included file after it's finished reading the current file.
OK so basically I need to paste the asm code directly into the BASIC code. I thought there might be a way to link to .asm files that had a definition or subroutine structure.
Thanks
ya. that would be nice to be able to link to an external .asm files