Re: Why doesn't this NASM program work? It loops endlessly

From: Francesca (spamtrap_at_crayne.org)
Date: 03/27/05

  • Next message: nanoman: "sdk-86 help needed, please"
    Date: Sun, 27 Mar 2005 01:04:08 +0000 (UTC)
    
    

    >
    >
    > There is no such thing as a MASM segment.

    As I have already told, I am an absolute beginner, and I have started to
    study, but every book I have read, always start talking about bit, bytes,
    memory, binary arithmetics, then, they immediately jump into Assembly
    programming.

    > Segment either refers to the addressable range using one of the
    segment

    I only asked what are bss, text segments in NASM. I didn't found them in NASM manual, some hint somewhere, but nothing clearly and deeply
    explained

    > For a Linux code file what is labeled as the code (text) segment is
    > memory mapped to pages of memory that are set to read and execute only,
    > while data is memory mapped to pages marked as read and write (not
    > exactly b/c writing to this does not change the on disk file, but you
    > should get the idea). The size of the bss segment is used to allocate
    > enough pages to hold that much memory, but this memory is not mapped to
    > any file. (this explination mixes virtual/real memory, so it isn't
    > completely accruate, but should get the idea accross and shouldn't
    > matter).

    SOmething like your explaination I would have liked to read in all the
    material I have read about Nasm programming.

    > From what I have read in this thread, you really should invest in a
    > decent intro x86 assembly text book b/c you really seem to be messing up
    > on some really basic stuff.

    Well, I am an absolute beginner with Assembly for X86 CPUs, as I have
    already explayned, I would like to learn. But what I would like is some
    book that starts explaining elementary operations like:

    - how to assign values to register/variables
    - how to read data from keyboard
    - how to display it to the screen
    - how to sum, moltiply, divide, subtract two operands and display the
    result to the screen
    - how to use if ..then and loops

    After that I could be more confortable with Assembly.

    > Assembly Language Step-by-step: Programming with DOS and Linux (with
    > CD-ROM) by Jeff Duntemann
    > http://www.amazon.com/exec/obidos/ASIN/0471375233/qid=1111874431/sr=2-3/ref=pd_ka_b_2_3/103-3872261-7017456

    I'll read it. Hope it is at a very basic level

    Thank you

    Francesco


  • Next message: nanoman: "sdk-86 help needed, please"

    Relevant Pages

    • Re: Initial values of File scoped and Block level variables
      ... the loaderallocates data segment ... If T is a function type, any initialization ... >that informs the loader to allocate 1 element of sizeofmemory. ...
      (comp.lang.c)
    • Re: Questions about Minix
      ... I think I got to that conclusion that .text shared the same memory chunk ... segment to processes from the beginning, and a data segment that did not ... True, but this would limit your stack size to some predetermined value, ... you still have plenty of heap left. ...
      (comp.os.minix)
    • Re: Software advice
      ... the processor to switch it back from protected mode to real mode. ... registers with a 'segment selector', which indexed into a table of segment ... different memory models and the distinction between near and far pointers ...
      (rec.arts.sf.fandom)
    • Re: How linear address translate to physical address in kernel space?
      ... the logical address must be pass segment translation. ... In paging process, CR3 register take one important role, it include page ... So in linux kernel, if it ... user task memory address space. ...
      (Linux-Kernel)
    • Re: [SLE] spyware
      ... What I'm saying is, very simple ... ... in the gun control there's a saying ... as far as I know as the segment should be handled by a true memory ...
      (SuSE)