Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting assembler source for "x86 device with no operating system" 1

Status
Not open for further replies.

Jenda

Programmer
Feb 27, 2001
14
CZ
It's most important question for me!

My target system is not PC, but some device with procesor 8086. There is no operating system (there isn't DOS!) and memory configuration is other then PC's.
(For booting is used FLASH in the higher memory range and the lower half of memory range is SRAM (for data and running programs)).
I have Turbo assembler v2.0 to developing aplications.

And my question now!!
----------------------
How can I set up my assembler source file (*.asm) to start
the code in the absolute address from 0F0000h and data somewhere in SRAM.

I tried - TEST.ASM file:
---------------------------
MASM
.186

Code SEGMENT PARA AT 0F000h
ASSUME CS:Code

org 0FFF0h ;here 8086 jump after reset
jmp start

org 0h
start:
nop
nop
nop

Code ENDS

END


when I compiled this and when I looked at structure of EXE file, there was the starting address 0000:0000 always and Turbo debugger showed nonsenses.

Please use some example of ASM file to explain how to do it!
I'm helpless to solve this problem!

Thank's Jenda
 
Hi Jenda,
If you tring to test you code on a PC, you have no control over CS register, the OS assign a value for this register and then start loading the program. But in you device I am sure there is a loader logic by some how and this loader my ba aware of the spcefic memory segmentation techniques of this device. The EXE file will start automatically in offset address 0000 so you problem is to have F000 in CS.
Did you try to load your program in this device and run to see if it will work or not.
Thanks Walid Magd
Engwam@Hotmail.com
 
Thanks for answer Walid.

My problem is,that I have only three "One time programming EPROMs" (what is used for booting after device reset) and I cannot try some experiments if it does go or doesn't.

So my answer is :
- if exist some software that can simulate device with procesor 8086 (with no operating system) and
- if exist any simple assembler (something like easy51 intended for 8051 procesors) where I can directly set-up absolute addresses of code and data.

Jenda.
 
Hello

I wrote a mistake. I wanted wrote:
"So my question is" instead "So my answer is".

Thanks Jenda
 
Hi Jenda,
Sorry for bieng late, you know work.

First of all, if you don't have DOS you can NOT use *.EXE files because they
require special handling for the relocation table which will be confusing
and unnecessary in your case.

Second, it's better NOT to use Turbo Assember. If you wanna have the freedom
to work from different code and data segments you have to work more low
level, which isn't easy using Turbo Assembler. I have a program a program to do that which makes such programs very easy. I'll search for it and send it
to you E-mail if you want, it's very easy and straight forward to use with
GUI...etc.

The only way you can control the value of the CS or IP registers is using
assembly language codes transfer commands like JMP FAR, CALL FAR, RET FAR.
You can set the CS:IP using many ways, let's say you want the CS=F000 and
IP=000, so you can do:

1. JMP FAR F000:0000

However, the 8086 initializes the values of CS to be FFFF and IP=0000, at
this address, there is usually a JMP FAR instruction to go to the actual
start of the ROM area, like JMP FAR F000:E05B.

Fell free to ask for any details if you want.
Thanks and good luck Walid Magd
Engwam@Hotmail.com
 
I'm happy for your answer Walid!

I agree with you, that Turbo Assembler isn't good for my work and I'm very enjoying for your simple assembler!!

Thank's for your help, Jenda.
 
Jenda,

Why don't you purchase an EEPROM (Which can be erased with either UV or electrically) with the same pinout as your OTP EPROM. I'm sure you are going to have to do more than 3 tests of your code before it is bugless (Or the bugs are buried deep enough that they are now a feature). Another option is to find a NOVRAM (Non volitile RAM) to place your code in temporarily, and then put a switch in the WR (Write) line to truly simulate the final ROM.... Just an idea.



Kim_Christensen@telus.net
 
for zBuilder

my answer:
I'm from Czech Republic and there is no way to get AM29F102 (what is FLASH type in PLCC package given into PLCC socket) and I must use as substitution 27C1024 (OTP with the same pinout).
I have never heard about NOVRAM,but:
1. I think to find the same type NOVRAM as my FLASH will be problem too
2. if you think a memory emulator controlled by PC, it's a good idea, but this needs to buy emulator (expensive) and to buy or make reduction to PLCC socket (and this is a big problem too).

to everybody

Please answer me, what do you think about developing in Turbo Assembler applications for device with 8086 (without
any operating system) - you can see the first question.

Thanks Jenda

P.S. : Hello Walid, I believe you know my e-mail, but I don't wont to hurry to you.
 
Hello Jenda
No, I don't know it at all, I told you to post and you didn't. I though this is not suitable for you. Anyways please post your E-mail or send me E-mail with the subject of this thread.
Thanks Walid Magd
Engwam@Hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top