I know the gas assembly, and this code isn't gas assembly!
I don't understand why the mov instruction is without operand e the seg instruction I don't understand that does and how translate it ....
I must translate this code on gas assembly!
Have you never seen a "rep mov*"? If you really are familiar with assembly you should recognise it. (you'll find it in the Intel manuals as rep and movsw, rather than rep and movw)
That said, you shouldn't copy-paste code you don't understand, and especially this bit.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
ok! But the instruction that I have writing isn't correct because if it is referred to instruction for the manipulation of the strings the "s" is missing on movw, or if it is the normal mov the operands are missing...
All right...
Therefore how can translate the seg instruction ( macro of the assembler ) in gas assembly, which doesn't have this instruction??
To be honest, I can't identify the assembler you're sourcing, I see two completely unrelated questions: one about you failing to recognising a memcpy, and one about you failing to look up a directive in the manual. Ask smart questions and realize this is a place for people capable of OS development, not novice (ASM) programmers.
In other words: you should read the forum rules, you probably guessed only one of them.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
You can't do anything useful with rep and a normal mov, so it should be obvious. You'll also need to have different contents in DS and ES if it's to do anything other than copy data straight back on itself (since SI and DI have been set to zero), so see if you can work out where the destination is and load ES accordingly. I don't know why you're trying to translate a defective program where you have to fill in the gaps, but good luck with it anyway.
I don't know why you're trying to translate a defective program where you have to fill in the gaps, but good luck with it anyway.
I am rewriting the bootsect.s of linux 0.12 for adapt it at my needs.
I have read the ASM manual , but the explanation of this is insufficient, because the manual explains how to use seg instruction with the symbol address and not with the registers segment.
The manual is this , chapter 3.6 SEG and WRT : http://www.nasm.us/doc/nasmdoc3.html