flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 03 Feb 2008, 06:21
Code: MyString array db 'test',0 ;defined your string mov al,[MyString] ;first element mov al,[MyString+1] ;second element mov ebx,MyString ;pointer to beginning mov ecx,MyString.lenght ;(sic) the length |
|||
![]() |
|
Gonzalo28 03 Feb 2008, 18:22
For strings i use this
Code: struc string [data]{ common . db data .lenght = $-.-1 } and for unicode i use Code: struc utf16 [data]{ common . dw data .lenght = $-.-1 } My idea is for use with integers arrays, float arrays, struct arrays etc... this better? Code: ;se = size of one element struc array se, type, [data]{ common . type data .lenght = $-. .se dd se } ; For use ; define one array MyArray 4, dd, 2345,253,5235,25 mov ebx, [MyArray] ; first element? mov ecx, [MyArray+MyArray.se] ; well? Again sorry for my english... |
|||
![]() |
|
bitRAKE 03 Feb 2008, 19:36
Code: struc pascal [data] { common db .len . db data .len=$-. } |
|||
![]() |
|
vid 03 Feb 2008, 21:47
Gonzalo28: small mistake: you forgot "array" in your code
|
|||
![]() |
|
Gonzalo28 03 Feb 2008, 23:26
Quote:
Yes, i sorry... Code: ;se = size of one element struc array se, type, [data]{ common . type data .lenght = $-. .se dd se } ; For use ; define one array MyArray array 4, dd, 2345,253,5235,25 mov ebx, [MyArray] ; first element? mov ecx, [MyArray+MyArray.se] ; no work... |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.