Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Storing String (Texts) :: ASM

2»

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [code]LOCAL a:byte, b:word, c:dword=room
    ENTER room, 0

    LEAVE
    RET[/code][blue]I am not sure you can use 'byte'. I remember using it caused some kind of alignment bug. I use word, dword only and if I use some structure - I always align it to word boundary.[/blue]

  • kuphrynkuphryn Member Posts: 266
    Nice! Thanks.

    What do the ENTER and LEAVE procedures mean? I have never seen it before in the book I am studying.

    Kuphryn
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Nice! Thanks.
    :
    : What do the ENTER and LEAVE procedures mean? I have never seen it before in the book I am studying.
    :
    : Kuphryn
    :
    [blue][b]ENTER[/b] makes room for local vars - so called stack frame.
    [b]LEAVE[/b] cleans up what [b]ENTER[/b] does. You need to use them only in pair.

    See CPU manuals.
    All described there.[/blue]
  • kuphrynkuphryn Member Posts: 266
    Okay. I understand the concept now. Thanks.

    I presume this concept applies to bot 16-bit and 32-bit.

    Kuphryn
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Okay. I understand the concept now. Thanks.
    :
    : I presume this concept applies to bot 16-bit and 32-bit.
    :
    : Kuphryn
    :
    [blue]Yes.[/blue]
  • Shawn CarterShawn Carter Member Posts: 0

    ______ // http://forcoder.org // free ebooks and video tutorials about | Delphi, C#, Go, Java, Assembly, Perl, Swift, Visual Basic .NET, PL/SQL, C++, Scratch, C, MATLAB, Python, PHP, R, Objective-C, Ruby, JavaScript, Visual Basic Prolog, D, Apex, F#, Erlang, Transact-SQL, Lua, Logo, Awk, Kotlin, SAS, Fortran, LabVIEW, Scala, COBOL, Rust, Clojure, ABAP, Bash, Ada, Hack, FoxPro, VBScript, Crystal, Dart, Scheme, Julia, Alice, ML, Lisp | _

2»
Sign In or Register to comment.