Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>off() - get the offset address of a string variable</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     off() - get the offset address of a string variable
  Usage:    <integer> = off(<variable>)
  Params:   string <variable> - a parameter of type string
  Returns:  an integer equal to the offset address of the
            passed string in decimal

 ---------------------------------- Example ---------------------------------

            * Use DOS interrupt to print a string, DOS function
            * 9 prints a string that is terminated by a
            * dollar ($) sign.....

                 * here's the string to print
                 string = "This is the string to print...$"

                 * register DS needs the segment of string
                 reg_ds(seg(string))

                 * register DX needs the offset
                 reg_dx(off(string))

                 * register ah needs the DOS function #
                 reg_ah(9)

                 * execute the DOS interrupt (21h) to print the
                 * string to standard output
                 interrupt(33) && (decimal 33 == 21h)


See Also: seg() peek() poke() peekstr() interrupt()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson