I'm going to write a 16-bit kernel in C, so I decided that TC is the only viable option to use under windoze. I've run into a few problems:
- How the hell do I do inline asm in this thing without it complaining about "inline assembly not allowed" or even "undefined symbol 'mov'" or anything like that?
- Will it compile to a simple flat binary?
EDIT: I'm using version 2.01.
Turbo C issues
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Turbo C issues
Hi,
coding OS under TC is realy cooool
to use assembly inside c code
first,let TC active 32bit opcode,using TASM5
(turbo assembler)
note:
by default TASM is not in TC package ,you need to add it in your /tc/bin
to add your assembly code use -> asm <-
finally,i invite you to use TC3.1 becuse it easy to do 32bit shift by <<,>> operator
you may use .286x,.236x,.486x,.586x
where x=no things || p
to make flat binary
it's difficult to convert .exe to .bin result to segmentation in exe,but if you make a .exe in tiny memory model you can
i recomended EXE2BIN.exe to do that
good luck
coding OS under TC is realy cooool
to use assembly inside c code
first,let TC active 32bit opcode,using TASM5
(turbo assembler)
Code: Select all
#pragma inline
by default TASM is not in TC package ,you need to add it in your /tc/bin
to add your assembly code use -> asm <-
Code: Select all
main(){
asm{.386
mov eax,0x12345678
}
}
you may use .286x,.236x,.486x,.586x
where x=no things || p
to make flat binary
it's difficult to convert .exe to .bin result to segmentation in exe,but if you make a .exe in tiny memory model you can
i recomended EXE2BIN.exe to do that
good luck
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
but it does make you part of a larger picture.