🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.asm.x86
3 messages
3 total messages Started by Charlie McIver Wed, 13 Jan 1999 00:00
Calling TC function from TASM
#118
Author: Charlie McIver
Date: Wed, 13 Jan 1999 00:00
24 lines
1564 bytes
Hi,

Firstly, I'm just getting into the details of assembler programming so
apologies if I seem a little ignorant.

I've got quite alot of experience of 80C51 and compatibles (though all are
embedded single chip microcontrollers so a doddle to use)

I'm using an 186 chip in an embedded application for my university project.
As I understand it I'm going to have start my initialisation in Assembler,
and I have an example of this which works. I then would like to jump into
Turbo C for most of the donkey work, dropping back to assembler when
required.

I've used TC and TASM before and as I recall it wasn't too hard, but how do
I do the initital jump from
Assembler to C?

Also, does anyone know of any good Serial Comms libraries that do not use
BIOS/DOS, but simple talk to the UART?

Many thanks from a keen newbie!

Charlie McIver
Re: Calling TC function from TASM
#119
Author: David Lindauer
Date: Wed, 13 Jan 1999 00:00
31 lines
1890 bytes

Charlie McIver wrote:

> Hi,
>
> I've used TC and TASM before and as I recall it wasn't too hard, but how do
> I do the initital jump from
> Assembler to C?

generally you do this through a call to the _main function (e.g. call _main).
In an embedded project it is also possible to jump directly to main, if you are
sure main isn't going to return.

>
>
> Also, does anyone know of any good Serial Comms libraries that do not use
> BIOS/DOS, but simple talk to the UART?

Did you look around on simtelnet?   I was told there is example code therefor
handling uarts directly.

David

--
---------------------------------------------------------------
David Lindauer    mailto:camille@bluegrass.net     ICQ: 8699592

http://www.ladsoft.com/index.htm                           (computer page)
http://www.geocities.com/Area51/Station/5196/index.html    (home page)
http://www.geocities.com/Area51/Station/5196/ttc.html      (tao te ching)
Re: Calling TC function from TASM
#120
Author: black_phantom
Date: Thu, 14 Jan 1999 00:00
32 lines
1889 bytes
> I've used TC and TASM before and as I recall it wasn't too hard, but how do
> I do the initital jump from
> Assembler to C?

In ASM file:

EXTRN _c_entry: near ; far for compact, large and huge memory models

call _c_entry
; Some termination code here - if c_entry() will return.

In C file:

c_entry()
{
}

Similar approach I saw in "Writing OS/2 device drivers in C" - there an author
called _main function this way (put params first).

> Also, does anyone know of any good Serial Comms libraries that do not use
> BIOS/DOS, but simple talk to the UART?

http://www.geocities.com/SiliconValley/Bay/8302/serial1.htm
is a pretty on-line tutorial on COM.


-- Sclerosis cannot be healed but can be forgotten --

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads