QBasic variables and call absolute

by Ben (no login)


I was wondering about how to access QBasic variables with assembly then calling absolute. I know the obvious way of passing VARPTR and VARSEG to stack

mov es,[bp+8]
mov di,[bp+6]
mov [es:di],50
;above won't actually work, just example.

But I know that it's possible to store stuff with NASM like this:

mov [stuff],50
stuff: dw 0

So what I need to know is this: does NASM view the above as one of them "macros" (not sure about that stuff) and store the "stuff" in memory and
mov [stuff],50
actually becomes:

...nasm generated stuff...
mov [es:di],50

Or maybe it stores the stuff in the ram close or something or same segment where the mov [stuff],50 is possible cpu instruction.

So what I want to know is this: can variables in qbasic can be put somewhere where it takes one mov to put stuff in/out of them?


Posted on May 20, 2009, 4:13 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Re: QBasic variables and call absolute (don't run included example)Michael Calkins on May 21, 2:26 PM
 This also should work, but doesn't... (don't run included example)Michael Calkins on May 21, 3:01 PM
  Here is one that does work.Michael Calkins on May 21, 4:28 PM
 correct versions: (these work)Michael Calkins on May 21, 4:48 PM
  Great thanks!Ben on May 22, 9:33 AM
   if pointer to string is known....Ben on May 25, 8:57 AM
    a variable length string?Michael Calkins on May 25, 3:16 PM
     Exactly what I wanted,,Ben on May 25, 4:57 PM
     String descriptors...Tim on May 28, 1:06 AM
      No it isn'tArtelius on May 28, 3:59 PM
    Ben, get Ethan Winer's book (*URL)Artelius on May 26, 1:00 AM
     * Book him Dano! He's too busy hacking the school computers!Clippy on May 27, 8:24 PM
 also....Michael Calkins on May 21, 5:18 PM

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement