BareED - Background Information For Developers.
BareED's stack arrangement.
BareED uses a linear stack arrangement for all function arguments - as provided and required by a68k C-compilers. This means also that the arguments are placed in reverse order on the stack - from the a68k-assembler programmer's point of view.
If you use a high level language in order to build your AmigaDOS applications that has a stack arrangement that differs to a68k C-compiler you have to create via an assembler the stub-functions - if you don't know how, contact me. I will give as much assistance as I can.
BareED only takes care of the 68k register "A4".
Any function of BareED's DAC-port will remember and restore the register "A4" if necessary. Unfortunately, the register "A4" is the only register which will be guaranteed to stay valid even through a hook-call - which means, that before one of your hook-code is called, the register "A4" is restored to its initial content. If you use for example E generated applications, you have to remember the register "A5" somewhere and restore it upon your hook-code is called - and before your hook-code returns control to BareED, you have to restore the "A5" register to the content that BareED requires (it's BareED's local stack frame).
You should also note that inside of a hook-function you have to restore all register contents - except "D0-D1 / A0-A1 / A4 / A6" when you return the control to BareED.
The DAC-interface connects two independent applications: BareED and any 3rd party!
The address, better said, the functions of this DAC-interface are supplied through a Workbench Startup alike message.
Precedingly, BareED has loaded your application's code via LoadSeg and has fired up it using CreateProc - whereby your running application will get the above stated message as soon as possible.
The difference now is that your program (it's really a plain AmigaDOS application) does not run under Workbench but as an independent process that is able to communicate with BareED through functions supplied by the Workbench Startup alike message.
You only have to check whether:
a) your process has gotten a Workbench Startup alike message (indicated by the WBenchMsg variable; set by most C-compilers)
b) the Workbench Startup message has got as name "BAREED"
c) the version of BareED's DAC port suffice for your task, i.e. whether the required functions are available.