Hi, On Thu, Jul 7, 2022 at 7:29 PM Daniel <codehunte...@gmail.com> wrote: > > A little info for those who uses FreeBasic (or even Power Basic 3.5) in > FreeDOS. In case noone knows this, it is possible to mix both Basic and > Assembly language in the same source code using both PB and FB using the > ‘ASM’ command. This is something I have been doing in PowerBasic for some > time. Not sure if anyone else has done this, but it is quite a nice feature > to have. > > I am unfamiliar woththe C languages, but does it also allow one to mix both > assembly in with the C source code? Are there any other languages that > allows mixing of assembly in with the language code?
Free Pascal's i8086-msdos cross-compiler (and even the normal i386-go32v2) supports inline asm (similar to TP 6): ======================================================================== {d2x.pas} {$mode tp} program d2x; var n:byte; err:integer; procedure hexbyte(b: byte); assembler; asm int3 mov al,b mov dx,ax mov cl,4 shr al,cl cmp al,10 sbb al,105 das int 29h mov ax,dx and al,15 cmp al,10 sbb al,105 das int 29h end; begin if paramcount=0 then halt; val(paramstr(1),n,err); hexbyte(n); writeln('=',hexstr(n,2)) end. ======================================================================== FST Modula-2 (found on iBiblio) also supports inline asm: * https://www.verhoeven272.nl/fruttenboel/modula-2/lowlevel.html _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user