Announcement

Collapse
No announcement yet.

Getting String Data w/Inline Assembler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting String Data w/Inline Assembler

    I am looking for the an example of how to get the data from a dynamic
    string and its length using PB-DOS's Inline Assembler. What would be
    the DOS equivelant to the 32-bit chunk below?


    Code:
       ! mov eax, StringIn       ; Get Input Buffer Handle to eax
       ! mov eax, [eax]          ; get address of data
      
       ! mov edx, [eax-4]        ; StringIn's Length into edx
       ! mov ebx, [eax+1]        ; second character into ebx
    StringIn is a dynamic string.


    Any help will be greatly appreciated....

    Thanks

    Scott Slater

    ------------------
    Scott Slater
    Summit Computer Networks, Inc.
    www.summitcn.com

  • #2
    In the IDE, press F1 twice for the Help table of contents. Select
    "Internal Procedures". Select "GETSTRLOC".

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      Thank you very much! That did the trick...

      ------------------
      Scott Slater
      Summit Computer Networks, Inc.
      www.summitcn.com

      Comment


      • #4
        If running PB/DOS under Win (at least 9x) in a DOS box, try the "Edit -> Mark" item from the control menu of the DOS box (or clicking the dotted square icon in the box toolbar), then selecting the text with the mouse, then "Edit -> Copy" still from the control menu (or clicking the Copy icon).
        If your box is at full screen instead, you can hit PrtScrn key to copy the whole screen as text.

        PS I translated Edit and Mark from my italian Win95 so i' m not 100% sure the names are the same.


        ------------------
        Davide Vecchi
        [email protected]operamail.com

        Comment


        • #5
          Yes, that is correct (Edit/Mark). Click/drag the mouse to "mark" the desired text rectangle, and press ENTER to copy it to the clipboard.

          If you are running full-screen, press ALT+SPACE to bring up the window menu.

          If Windowed under Win9x, you can also use the optional window toolbar buttons. The toolbar can be enabled through the window menu too.


          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment

          Working...
          X