Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

a question about 8086

Status
Not open for further replies.

NTFS

Member level 3
Joined
Apr 6, 2004
Messages
67
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
576
mov cs, 8086

Hi all

I want to know how can I put a segment in special address.
for example I want to write my program from address FF7FFh ( absolute address ) so the CS register equals FF00h and IP equals 07FFh ( FF00:07FF = FF7FF ).
I know that if I write a directive ORG before intructions I can set the IP, mean I can set IP but I do not know how set CS or how put my code segment in a special address in 1MB 8086 address area.

Please help.

Thanks in advance.

PS. I want to make a single board cpu and I don't want to use it for PC.
 

NTFS

Member level 3
Joined
Apr 6, 2004
Messages
67
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
576
it does not work
 

alwaly

Newbie level 1
Joined
Apr 21, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
I thinks this should work: using the A86 Assembler:


MOV BX, FF00

MOV IP, 007F

MOV CS, BX , Loads the value 00FF into CS register

CodeSeg SEGMENT ‘CODE’ , creates a code segment called CodSeg

ASSUME CS:CodeSeg , assigns CS as the base of that segment

Assembly instructions
.
.
.
CodeSeg ENDS , VERY IMPORTANT TO END THE SEGMENT!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top