flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > POP CS complied successful while MOV CS,AX doesn't |
Author |
|
l4m2 26 Jul 2015, 04:00
What for? Or bug?
Last edited by l4m2 on 27 Jul 2015, 08:51; edited 1 time in total |
||||||||||
26 Jul 2015, 04:00 |
|
revolution 26 Jul 2015, 05:07
fasm can compile for 8086 CPUs also.
|
|||
26 Jul 2015, 05:07 |
|
l4m2 26 Jul 2015, 05:47
revolution wrote: fasm can compile for 8086 CPUs also. |
|||
26 Jul 2015, 05:47 |
|
l4m2 27 Jul 2015, 03:14
El Tangas wrote: I've read pop cs worked on the 8086 (the opcode 0x0F was later recycled for other instructions, as a kind of prefix, for example for SIMD instructions), not sure about mov cs,reg. It will be difficult to find a 8086 to test it |
|||
27 Jul 2015, 03:14 |
|
El Tangas 27 Jul 2015, 11:47
In this thread in another forum, there is a guy with access to these old cpu's saying that it works:
sergey wrote: I actually tested POP CS and MOV CS,reg/mem some time ago. All 8088 processors and NEC V20 execute these instructions as unconditional JMP - CS is changed with the new value, IP is advanced to the next instruction. This includes Intersil 80C88 for which the datasheet specifically says that "MOV CS, REG/MEMORY not allowed." (page 36). And by the way it doesn't say anything about POP CS (page 29 of the same datasheet). http://www.vintage-computer.com/vcforum/showthread.php?36284-Undocumented-Instructions-on-Intel-8088-and-NEC-V20&s=2dd38681b5045060d5bf3ca2b18cb1e6 |
|||
27 Jul 2015, 11:47 |
|
shutdownall 27 Jul 2015, 12:36
Okay - 8088 is not really 8086.
|
|||
27 Jul 2015, 12:36 |
|
l4m2 27 Jul 2015, 16:35
D8086 INTEL CPU LOT OF 1
£7.71 + £*.** postage From United States Customs services and international tracking provided ... |
|||
27 Jul 2015, 16:35 |
|
shutdownall 28 Jul 2015, 12:17
And do you have a mother board with a socket for 8086 ?
EGA or CGA adapter ? I think this is retro stuff. |
|||
28 Jul 2015, 12:17 |
|
revolution 28 Jul 2015, 12:19
I think a video adapter is not needed. Just an LED would be enough. Program an EPROM/FLASH chip with a simple test program to check whether mov cs,ax is successful and turn on/off the LED accordingly.
|
|||
28 Jul 2015, 12:19 |
|
shutdownall 28 Jul 2015, 12:21
Is this maybe more a plain academic approach ?
|
|||
28 Jul 2015, 12:21 |
|
El Tangas 28 Jul 2015, 23:15
So, lets see... A 8086 CPU, a breadboard, programmable ROM with test program, needs to be 16 bit interface, a MCU to feed signals to the 8086 under controlled conditions... Not gonna be easy...
Or buy a vintage 8086 system, I think I may get a Sinclair PC200 for 50€. I will try to get it if its working 100%. Then a floppy drive with DOS, and we are game |
|||
28 Jul 2015, 23:15 |
|
l4m2 29 Jul 2015, 01:55
Still I found samples of 8086 in Proteus
|
|||
29 Jul 2015, 01:55 |
|
El Tangas 29 Jul 2015, 11:38
l4m2 wrote: Still I found samples of 8086 in Proteus You're right, I wonder if it is an 100% accurate simulation. Also, here is a macro to assemble mov cs, by first assembling mov es and then modify it. Code: macro mov dest, src { if dest eq cs recode = $+1 mov es, src ;read original opcode load a byte from recode ;convert es to cs store byte a or 8 at recode else mov dest, src end if } update: Well, already tested on Proteus simulation and it works. Here is my test program: Code: macro mov dest, src { if dest eq cs recode = $+1 mov es, src ;read original opcode load a byte from recode ;convert es to cs store byte a or 8 at recode else mov dest, src end if } j1: mov ax,1 mov cs,ax jmp near j1 align 16 j2: mov ax,0 mov cs,ax jmp near j2 I loaded at entry point CS:IP = 0000:0000 and it toggles between the 2 cycles, as expected kind of crazy. |
|||
29 Jul 2015, 11:38 |
|
shutdownall 29 Jul 2015, 12:23
l4m2 wrote: D8086 INTEL CPU LOT OF 1 I wonder if United States has a new currency or do you mean the United States more near to Europe with the Tower Bridge ? |
|||
29 Jul 2015, 12:23 |
|
Hayden 10 Dec 2015, 12:37
from memory i think the intel books say that mov cs, reg or mov cs, [mem] not allowed. You can push pop segment addresses into cs. also look at lds, les instructions
_________________ New User.. Hayden McKay. |
|||
10 Dec 2015, 12:37 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.