(My) fork of 8086 Assembler for DOS (Announce)
> Aha, I wouldn't imagine possibility of mixing TP and C-- code (no problems
> with call conventions?).
No problems.
> Can you describe it a bit more detailed?
Here is Michael Schreker C--.
this function return length of string k:
("d" parameter is not need, i just put it for proof params order)
int pascal cmm_length(int d, dword k) {
// k = pascal string
// d - something other
$push ds;
$lds si,k;
$cld;
$lodsb;
AH = 0;
$pop ds;
}
also, you can define length as far
int pascal far length(int d, dword k) {
compile it with
c-- /x /sobj len.c--
(/sobj mean slave obj, /obj produce obj with entry point in our case we not need entry point)
and use into TP - it must work for TP 5.0 ang great (ver 3.0 had alternative way without obj, 4.0 - i never try and use):
function cmm_length(d:integer;k:string):integer;near;external;
{$L LEN.OBJ}
or far:
function cmm_length(i:integer;k:string):integer;far;external;
and call it:
writeln(cmm_length(0, 'hello world!'));
If i am not wrong (i don't remember preciously now), i am check and compare original C-- source code and Michael's source: original C-- does not produce FIXUP record for obj (i love this [censored] record!) - just put code without relocation info, so you can't use static/global variables into C-- obj's. Michael fix and add it. (This is IMHO, need check it again).
> produce also OMF and then link together with some OMF linker to target EXE?
without linker - TP can consume obj/omf.
Also, no problem linking C-- and Watcom C (i do it for real mode).
Possible easy linking with TP3, but i think it is non-actual.
C-- can do a real magic for you. I have problems only linking with Small C - Small C does not use Borland/Microsoft name convention for segments (TEXT/DATA/BSS etc). It think root cause is - because this convention is created later then Small C. I have idea - rewrite std-library for Small C in C-- (i think it must be a rocket-speed).
PS: Scheker's C-- have a bug - add unwanted byte to driver header (when produce ms-dos .sys file). I send bugreport to Michael, but Michael stop respond on any mail.
---
Make DOS great again!
Make Russia small again!
Complete thread:
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 01:01 (Announce)
- (My) fork of 8086 Assembler for DOS - DosWorld, 26.12.2020, 16:01
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 16:31
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 17:25
- (My) fork of 8086 Assembler for DOS - RayeR, 26.12.2020, 22:48
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 00:03
- (My) fork of 8086 Assembler for DOS - RayeR, 27.12.2020, 03:57
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 22:11
- (My) fork of 8086 Assembler for DOS - RayeR, 28.12.2020, 01:09
- (My) fork of 8086 Assembler for DOS - DosWorld, 28.12.2020, 14:00
- (My) fork of 8086 Assembler for DOS - RayeR, 30.12.2020, 05:18
- (My) fork of 8086 Assembler for DOS - DosWorld, 28.12.2020, 14:00
- (My) fork of 8086 Assembler for DOS - RayeR, 28.12.2020, 01:09
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 22:11
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 08:49
- (My) fork of 8086 Assembler for DOS - marcov, 29.12.2020, 19:14
- (My) fork of 8086 Assembler for DOS - RayeR, 27.12.2020, 03:57
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 00:03
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 17:18
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 17:33
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 18:14
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 23:26
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 18:14
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 23:22
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 13:22
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 17:33
- ASM's symbol handling needs work - Japheth, 26.12.2020, 19:18
- ASM's symbol handling needs work - rr, 26.12.2020, 19:23
- ASM's symbol handling needs work - rr, 26.12.2020, 23:22
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 01:05
- (My) fork of 8086 Assembler for DOS - rr, 29.12.2020, 01:55
- (My) fork of 8086 Assembler for DOS - rr, 02.03.2022, 21:54
- (My) fork of 8086 Assembler for DOS - DosWorld, 26.12.2020, 16:01