flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > what is difference between big-endian and little-endian?

Author
Thread Post new topic Reply to topic
antos



Joined: 13 Jul 2016
Posts: 23
Location: Syria
what is difference between big-endian and little-endian?
what is difference between big-endian and little-endian?

_________________
V0.01
Post 16 Jul 2016, 15:05
View user's profile Send private message Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 232
Location: film "CandyMan" directed through Bernard Rose
see there: https://en.wikipedia.org/wiki/Endianness

to reverse the byte order of a 32/64-bit register is BSWAP instruction

_________________
smaller is better
Post 16 Jul 2016, 18:40
View user's profile Send private message Reply with quote
antos



Joined: 13 Jul 2016
Posts: 23
Location: Syria

CandyMan wrote:
see there: https://en.wikipedia.org/wiki/Endianness

to reverse the byte order of a 32/64-bit register is BSWAP instruction



Well, i want to develop a OS for Intel X86_64 architecture, what i need to notice about Endianness?

_________________
V0.01
Post 17 Jul 2016, 11:58
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15303
Location: Bigweld Industries

antos wrote:
Well, i want to develop a OS for Intel X86_64 architecture, what i need to notice about Endianness?

Perhaps the best thing to know is that the endianness is little for all x86 and all compatible CPUs. Least significant bytes at numerically smaller addresses.
Post 17 Jul 2016, 13:35
View user's profile Send private message Visit poster's website Reply with quote
antos



Joined: 13 Jul 2016
Posts: 23
Location: Syria
Think i wrote a driver for USB 2.0, if i want to write memory to HDD, will i need to use BSWAP Instruction for converting memory to Big-Endian? Or if i want to read data from HDD, will i need to use BSWAP Instruction for converting data to Little-Endian?

And what is Offsets and Segment registers?
Post 17 Jul 2016, 15:12
View user's profile Send private message Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
No, you don't need to use BSWAP unless you're reading something like a file header that uses big endian values.

A segment register selects a 64 kilobyte block of memory that you can then access with a general purpose register containing the offset into that block.

I admire your willingness to learn, but you should probably read some documentation and tutorials first instead of asking us a million questions.
Post 17 Jul 2016, 19:03
View user's profile Send private message Reply with quote
antos



Joined: 13 Jul 2016
Posts: 23
Location: Syria
Which tutorial? I find a Assembly tutorial on documentations, but it is was pretty old and so, writed for DOS.
Can you advice an up-to-date source?
Post 17 Jul 2016, 22:10
View user's profile Send private message Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
If you're asking about segment registers, then 16-bit development in DOS would be appropriate. See the sticky post in the DOS forum: http://board.flatassembler.net/topic.php?t=9473

Unless you would rather target newer systems, in which case there are sticky posts in the other forums as well.
Post 17 Jul 2016, 22:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.