Re: while trying to learn pack



John W. Krahn wrote:
Richard Lee wrote:
I am begining to read bit of low level(assembly) book to just gain some knoweldge on inner workings of memory.

My quesiton is, if machine is 32 bit, even if it's accessing string 'A', it will have to fetch 32 bit (instead of 8 bit that requires to make that letter A ) ?

It depends on the CPU. An Intel compatible CPU has instructions to access 8 bit values from memory but some CPUs can only access 32 bit aligned data.

I know this is not a mailing list for this but i figure since it's closely related to pack, i thought someone would clarify for me.

It is not really related to pack() as pack() is a high level function that can hide the details of the CPUs addressing problems.

I am reading "step by step assembly language"... I am not sure i will read the whole thing but i just want to get better inner working of memory as my c book didn't do enough justice.


John
thanks guys

Just one more question on the topic,
I am trying to understand how it works in binary world.
So, If let's say I take a pcap file. I am assuming here that ethereal/wireshark will take binaries on the wire and then decoding it based on pcap standard(? hex? ) and then present them in ascci ?

so which means in order to unpack pcap file, I have to know how ethereal pack on their own.. is this something similar to what happens when pcap file gets created?
.



Relevant Pages

  • Re: while trying to learn pack
    ... knoweldge on inner workings of memory. ... An Intel compatible CPU has instructions to access 8 bit values from memory but some CPUs can only access 32 bit aligned data. ... It is not really related to pack() as packis a high level function that can hide the details of the CPUs addressing problems. ...
    (perl.beginners)
  • RE: while trying to learn pack
    ... some knoweldge on inner workings of memory. ... It depends on the CPU. ... It is not really related to pack() as packis a high level function ... If let's say I take a pcap file. ...
    (perl.beginners)
  • Next July 27: boot failure(hang) on x86_64 box.
    ... Freeing unused kernel memory: 1360k freed ... ACPI: PM-Timer IO Port: 0x488 ... CPU: L2 Cache: 1024K ... # AX.25 network device drivers ...
    (Linux-Kernel)
  • [PATCH] Document Linuxs memory barriers [try #3]
    ... The attached patch documents the Linux kernel's memory barriers. ... I've tried to get rid of the concept of memory accesses appearing on the bus; ... barring implicit enforcement by the CPU. ...
    (Linux-Kernel)
  • Oops in 2.6.28-rc9 and -rc8 -- mtrr issues / e1000e
    ... Bios 1.04beta did show correct memory sizing in dmidecode, ... I hope this is as simple as me doing something glaringly wrong in the kernel ... DMI present. ... CPU: L2 cache: 6144K ...
    (Linux-Kernel)