flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > FASM + C/C++ |
Author |
|
b0b 22 Jan 2005, 04:37
I have looked at some of the tutorials on the net and I have a large C/C++ background. I find it easier to program most of my OS in C/C++.
I read this tutorial and I wanted to use FASM. How would I impliment it though? |
|||
22 Jan 2005, 04:37 |
|
crc 22 Jan 2005, 12:45
Under which C compiler and host OS?
|
|||
22 Jan 2005, 12:45 |
|
mike.dld 22 Jan 2005, 13:20
I was doing it like this with MSVC++. In FASM:
Code: format MS COFF include '%fasminc%\win32a.inc' ; if you want to use come WinAPI funcs, declare them like: ;extrn '__imp__MessageBoxA@16' as MessageBox:dword macro p_cproc name,[arg] { common public name as '_'#`name cproc name,arg } section '.text' code readable executable p_cproc m_strncpy,p_str1,p_str2,dw_num push edi esi mov edi,[p_str1] mov esi,[p_str2] mov ecx,[dw_num] cld rep movsd pop esi edi return endp After that, C-code: Code: extern "C" dword m_strncpy(char*,char*,dword); |
|||
22 Jan 2005, 13:20 |
|
b0b 22 Jan 2005, 15:06
Im on Windows XP, so I use the DJGPP tools (even if it's DOS).
|
|||
22 Jan 2005, 15:06 |
|
f0dder 23 Jan 2005, 12:27
b0b, get the free vc2003 kit from microsoft - it's one of the best performing x86 compilers around, it's very standards compliant, and it's free and with a very liberal license (you can use it to develop your own OS if you want): http://msdn.microsoft.com/visualc/vctoolkit2003/
|
|||
23 Jan 2005, 12:27 |
|
Juras 22 Feb 2005, 21:16
what linker should then be used??? :-O
|
|||
22 Feb 2005, 21:16 |
|
SadKo 19 Nov 2005, 21:43
I use Watcom C/C++ compiler (you can download it on http://www.openwatcom.org/).
|
|||
19 Nov 2005, 21:43 |
|
jdawg 03 Dec 2005, 09:35
One question. How did you get away from being forced to produce code for another executable image type than the standard ones for your O.S. using C/C++?
|
|||
03 Dec 2005, 09:35 |
|
DataHunter2009 11 Dec 2005, 21:27
When I compile that code kernel_start.asm code, I get a "PE operations on Non-PE file" error in the linker. Any ideas?
|
|||
11 Dec 2005, 21:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.