So, in principle, SAVEOBJ4 can save any code file, of any start, any length and any page?
yep
If I have a source file and want to assmble a "file 1" it into page 7, I do assmble, and then want to save the "file 1" machine code on the disk. Could you write me, what steps should I follow?
As I understood you should write something like this:
Код:
include "saveobj4.h"
; saving code here --------------
org 0x8000
saveMyCode
jp nenado
; the code ----------------------
code_start equ 0xc000
code_page equ 7
org code_start, code_page
; some code
ld a, a
; end of code
code_len equ $ - code_start
; table -------------------------
org 0x5b00
ObjTab
db "file 1 " ; 9 bytes
dw code_start
dw code_len
db code_page
dw 0
db 0 ; end of table
so, you can call saveMyCode after compilation. ( Note: The code above is a "pseudo" code, it demonstrates only idea ). As we saw main idea of that proc - easiest way to save multiple compiled files. The data in the structer is just to create file on file system.
Do I have to keep the source code of "file 1" in the memory all the time? Do I have to keep a source code of "SAVEOBJ4" in the memory all the time?
I'm not sure if it neccesary, it seems that it can be compiled from disk.
Maybe a stupid question, but how can I load more sources into alasm? If I load them, they keep loading in page 6, and they are overwritten. How to solve it?
There's a command in main.. hmmm... menu ( when cursor 'A' ) ( 'P' - key ) it types PAGE so you can enter page number. After that the page becomes 'current'. If it empty new file will be created.