Oxygen Basic
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Latest OxygenBasic.zip at GitHub
(Click on the Wizard)
Home
Help
Search
Login
Register
Oxygen Basic
»
Information
»
Open Forum
»
Bstring & Pointer
« previous
next »
Print
Pages: [
1
]
Author
Topic: Bstring & Pointer (Read 2188 times)
0 Members and 1 Guest are viewing this topic.
Peter
Guest
Bstring & Pointer
«
on:
May 18, 2014, 06:34:34 AM »
Deleted
«
Last Edit: May 05, 2015, 09:12:03 AM by Peter
»
Logged
Charles Pegge
Guest
Re: Bstring & Pointer
«
Reply #1 on:
May 18, 2014, 07:05:48 AM »
use
string
if you prefer, Peter.
Strings are garbage collected and have one more level of indirection than bstrings.
addr
myreg, mystring
should resolve the character pointer to myreg in both cases.
addr eax,table
Logged
Charles Pegge
Guest
Re: Bstring & Pointer
«
Reply #2 on:
May 18, 2014, 10:49:07 PM »
addr
is a pseudo-instruction for resolving variable / string / label addresses. Essential for accessing strings of different types and params passed by reference.
Incidently, you can place a string literal anywhere in your code, and its address will be loaded into the eax register:
"abcd"
print hex [eax]
(The linker usually shunts all string literals into the initialised data section)
Logged
Mike Lobanovsky
Guest
Re: Bstring & Pointer
«
Reply #3 on:
May 18, 2014, 11:27:13 PM »
What does the linker do with stray string literals not referenced anywhere in the code?
Logged
Print
Pages: [
1
]
« previous
next »
Oxygen Basic
»
Information
»
Open Forum
»
Bstring & Pointer