Thanks.

2014-02-11 21:25 GMT-03:00 Steven G. Messervey <[email protected]>:

> Hello. I want learn assembly, and I playing with 16 bit.
>
>
> I have this little .com file that print the letter Z:
>
>
> org 100h
> mov al, 'Z'
> int 29h
> ret
>
> But I want use that instruction from a c program with tiny c:
> And I have this, but not works:
>
> #include <stdlib.h>
> int main()
> {
>  __asm__ (
>   "movl $90,%al\n\t"
>   "int $0x29"
>  );
>
>  return 0;
> }
>
> what is wrong ?
> _______________________________________________
>
> There are a few of problems here:
> 1) tcc is 32 or 64 bits
> 2) tcc produces Windows EXEs, not COM files
> 3) The EXEs only work in protected-mode Windows, not real-mode DOS
>
> If you are looking for a 16-bit C toolset:
>
> DJGPP: http://www.delorie.com/djgpp/16bit/
> ...has instructions for creating a gcc for 8086.
> Read the caveats!
>
> OpenWatcom: http://www.openwatcom.org/
> ...has a complete dev environment, including compiler and assembler,
> that will work for 16-bit DOS. The assembler is MASM-like
>
>
> If you want to develop assembler modules and link them to C, I would
> recommend:
> fasm (http://flatassembler.net/)
>
> NASM (http://www.nasm.us)
>
> There are probably more, google will help to find them.
>
> Hope This Helps,
>   Steve
>
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to