Author Topic: an explanation of the string types  (Read 2673 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
an explanation of the string types
« on: June 29, 2011, 11:51:02 PM »
Charles, can you just give an overview of the string types? There are a few and I don't when you are supposed to use them.

Aurel

  • Guest
Re: an explanation of the string types
« Reply #1 on: June 30, 2011, 03:34:35 AM »
Yeah good point Kent.
zstring -> what is it?
bstring...
etc

Charles Pegge

  • Guest
Re: an explanation of the string types
« Reply #2 on: June 30, 2011, 09:26:23 PM »
 Hi Kent and Aurel,

Null terminated strings:

1 byte characters: zstring asciiz char
2 byte characters: zstring2 wchar (next release)

Bstrings: length encoded & null terminated. Must be freed when finished

1 byte characters: bstring
2 byte characters: bstring2

Dynamic strings. length encoded & null terminated. Automatically freed.
These are the preferred types. The others are for OS calls and other low level stuff.

1 byte characters: string
2 byte characters: wstring

Other string types cstring and gstring are for internal use.

Here is the current list of primitives used by Oxygen. There are a few synonyms in this list

Code: [Select]
'================================
'primitives (Basic and C style
'================================


data "void      15 &h00" '*
data "byte      15 &h21"
data "ubyte      15 &h21"
data "string    15 &he1"
data "wstring   15 &he2"
data "bstring   15 &hc1"
data "gstring   15 &hc1" '* for core functions only
data "bstr      15 &hc1"
data "bstring2  15 &hc2"
data "char      15 &ha1"
data "wchar     15 &ha2"
data "cstring   15 &ha1" '* for core functions only
data "asciiz    15 &ha1"
data "zstring   15 &ha1"
data "zstring2  15 &ha2"
data "asciiz    15 &ha1"
data "short     15 &h02"
data "long      15 &h04"
data "int       15 &h04"
data "integer   15 &h04"
data "float     15 &h64"
data "single    15 &h64"
data "double    15 &h68"
data "extended  15 &h6A"
data "ext       15 &h6A"
data "quad      15 &h48" '* using FPU (was 08)
data "word      15 &h22"
data "dword     15 &h24"
data "ulong     15 &h24"
data "uint      15 &h24"
data "qword     15 &h28"
data "any       15 &h08"
data "sys       15 &h08"
data "bool      15 &h08"
data "cpu       15 &h04" '*
data "fpu       15 &h40" '*
data "mmx       15 &h130" '* asm only
data "xmm       15 &h150" '* asm only
'
'group:    primitive types
'groupref: types

Charles

« Last Edit: July 01, 2011, 01:59:11 AM by Charles Pegge »

kryton9

  • Guest
Re: an explanation of the string types
« Reply #3 on: July 01, 2011, 01:47:16 AM »
Thanks Charles. Will add that to the reference of if you want just add it, it is useful information.

efgee

  • Guest
Re: an explanation of the string types
« Reply #4 on: October 03, 2011, 07:14:57 PM »
This information was added to the wiki.  ;D