![]() |
Question about the ORG value - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: How-To & Tutorials (https://www.boriel.com/forum/forumdisplay.php?fid=13) +---- Thread: Question about the ORG value (/showthread.php?tid=830) |
Question about the ORG value - LukeBord1 - 11-18-2017 Maybe the question could result dumb to Assembly experts; however, is there a way to make an ORiGin memory address flexible? Saying it more clearly, even setting an ORG value in the ZXB commandline, is there a way to import the code into a new memory address? Re: Question about the ORG value - boriel - 11-22-2017 Currently not. What do you want to achieve exactly? Re: Question about the ORG value - LukeBord1 - 11-23-2017 boriel Wrote:What do you want to achieve exactly? ...just to avoid to repeat the compile process regarding multiple bas files when the first org value is incorrectly calculated. I thought there was a way to freely import the compiled bin files as it happens with other tools like screen compressors or sound fx generators. Re: Question about the ORG value - boriel - 11-24-2017 LukeBord1 Wrote:You can, but not with ZX Basic cdeo, but with ASM code:boriel Wrote:What do you want to achieve exactly? 1) Compile your code with zxbasm for example 2) Your code must be relocatable (no org, no JP's, just JR, etc) 3) In your ZX Basic program do: Code: PRINT "Hello world" In the mean time, just to let you know that, at this moment, ZX Basic does not have a linker (yet to be done). But I think is what you're asking for. Basically, libraries (.BAS and asm) to be compiled once and stored in a binary format in a lib/ directory to be reused later, like C and other languages do. Still working on it. |