flat assembler
Message board for the users of flat assembler.

Index > 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
antos 16 Jul 2016, 15:05
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: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 16 Jul 2016, 18:40
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
antos 17 Jul 2016, 11:58
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: 20416
Location: In your JS exploiting you and your system
revolution 17 Jul 2016, 13:35
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
antos 17 Jul 2016, 15:12
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
Trinitek 17 Jul 2016, 19:03
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
antos 17 Jul 2016, 22:10
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
Trinitek 17 Jul 2016, 22:25
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


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.