English
Assembler Forum

Memory-Variable and simple reaches

 

if 0

     {$cleq}

endif

declare area#, y&, z&
dim area#,16
print
print "Erster Test to that Use with Memory-Variables# and einfachen reaches in XPIA"
print " (in this part goes it solely circa long&-values with 4 byte = 32 bit)"
print
z& = 1234567899
y& = 1212
print "------ Profan-part ------"
print "An position 0 of area# becomes zugewiesen",z&
long area#,0 = z&
print "An position 4 of area# becomes zugewiesen",y&
long area#,4 = y&
print "Probe: on position 0 the Bereiches standing tatsächlich", @long(area#,0)
print "       on position 4 the Bereiches standing tatsächlich", @long(area#,4)
print
print "Die Variable ´bereich#´ shows whom Wert",area#
set("decimals",0)
print "Die function Addr( area# ) supply ebenfalls", Addr( area# )
print "Addr( area# ) supply means whom Content the Zeigers ´bereich#´"
print "Aber on what shows it?"
print
print "---- Assemblerteil ----"

AsmStart Alig1( area# )

    MOV EAX, para1

AsmEnd (z&)

Print "Der Content of ´bereich#´, is with MOV EAX read als", z&

AsmStart Alig3( area# )

    MOV EBX,para1
    LEA EAX, [EBX]

AsmEnd (z&)

Print "Test: Para1 shows on Speicherstelle", z&

AsmStart Alig2( area# )

    LEA EAX, para1

AsmEnd (z&)

Print "An Speicherstelle ´bereich#´ standing one 32bit-Zeiger, the auf", z&,"zeigt."
print "----------------------"
print "Der 16-byte-alignment-Versatz the Bereichsbeginns is ", z& mod 16
print "Ergebnis NULL is VERY important for speedy SSE/SIMD-Algorithms!"
print "----------------------"

AsmStart Alig4( area# )

    LEA EBX, para1
    LEA EAX, [EBX]

AsmEnd (z&)

Print "Probe: para1 verweist indirect auf", z&

AsmStart Alig5( area# )

    MOV EBX, para1
    MOV EAX, [EBX]

AsmEnd (z&)

Print "Und there against standing = ", z&

AsmStart Alig6( area# )

    MOV EBX, para1
    MOV EAX, [EBX + 4]

AsmEnd (z&)

Print "Und 4 byte moreover standing = ", z&
Print "----- my Schlussfolgerung -----"
print "´Der Content of area#´ position So one internal Zeiger dar, in the "
print "der Beginn the reserved Speicherbereiches vermerkt is!"
print
print "Garantie Gibts naturally no! but for cordial Regards of woodpecker ;-)"
WaitInput
dispose area#
End

Edit of Jörg: With the whom code-Tags shining Real heavy To his! 
is correct, where should Beginner too know, that the # what with Code do has?
 
08/27/08  
 



here another response, with direct input the address To foot
can itself Change, if zwischenzeitlich what new declariert or new launched becomes.
means Program started , address remember ,immediate bring into action,again Starting and The Solution is there.
The Offset we to direct address zugerechnet.
functions as Poke and Peek, How with usual Basicprogrammen.
means : area# contain The direct Speicheradresse in the written go can.
The address becomes so far reserved so tall How before the DIM was.
One simple and fast take action.

mfg
peter
declare area#
declare address%
dim area#,16
byte area#,0 = 7
byte area#,1 = 8
print Addr( area# )
print byte(Addr( area# ),0)
print byte(Addr( area# ),1)
print byte(177857072,0)
print byte(177857072+1,0)
waitkey
 
08/28/08  
 



@Peter: Kompileranweisungen the XPSE must You do not in a Blockanweisung take off - these becomes XProfan anyhow not achieve if XPSE vorgeschaltet is.

If you nevertheless The instruction to maintain want, without XPSE To benefit, then there this a undokumentierten ploy: the ignore of XPSE-Kompileranweisungen can z.B. with the Remtyp and the Remtyp //, verwendest You however twice the characters , means , then becomes the switch of XProfan (naturally) dank Rem overlooking - but XPSE krallt itself whom switch nevertheless. The exception counts but only for 2 x to the instruction.
 
08/28/08  
 




Jörg
Sellmeyer
If you a Speicherbereich benötigst, the itself to Laufzeit not changes (except through your Program), will need you it just at the beginning the program deklarieren and yet gewünschter Size dimensionieren. The area becomes as long as reserved, To it with Dispose Var# again released becomes. former were only such not-dynamic Memory-Variables possible.
whether The then in windows objectively on physical aufeinanderfolgenden Adressen described go, venture I To bezweifeln. the might of Defragmentierungszustand the Rams take down.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/08  
 




Jörg
Sellmeyer
iF
@Peter: Kompileranweisungen the XPSE must You do not in a Blockanweisung take off - these becomes XProfan anyhow not achieve if XPSE vorgeschaltet is.

If you nevertheless The instruction to maintain want, without XPSE To benefit, then there this a undokumentierten ploy: the ignore of XPSE-Kompileranweisungen can z.B. with the Remtyp and the Remtyp //, verwendest You however twice the characters , means , then becomes the switch of XProfan (naturally) dank Rem overlooking - but XPSE krallt itself whom switch nevertheless. The exception counts but only for 2 x to the instruction.


the have You do not documents? this is the best feature at all on XPSE! Beautiful, the too time To experienced.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/08  
 




whether The then in windows objectively on physical aufeinanderfolgenden Adressen described go, venture I To bezweifeln.


there be I me sure. otherwise could we Yes The trouble save , such short command auszudenken.
because at started one Program (here Profan) this space only yet for the a Program Profan present is. If you one 2. Profan launch and probehalber The same Adresszahl eingibst, become You not WinXP? grab can of Profan at 1. Start, though at 2. Program The address too present is, You get a others worth.
If your Ram on the place defekt is wist You The number not any more find.

If one The Program.exe of Profan naturally manufactured, with one Disassembler machine, become You it check.

mf
peter
 
08/28/08  
 




Jörg
Sellmeyer
Defekter Ram ought to thereby a untergeordnete strain play. adopted your Ram sees so from:
Daten|Daten|Daten|Daten|Daten| |Daten| |Daten|Daten| |Daten| | | | | | | | |

and You launch your Program, then faith I do not, that the memory hiterher so looks:
Daten|Daten|Daten|Daten|Daten| |Daten| |Daten|Daten| |Daten|Profan|Profan|Profan|Profan|Profan| | | |

separate so:
Daten|Daten|Daten|Daten|Daten|Profan|Daten|Profan|Daten|Daten|Profan|Daten|Profan|Profan| | | | | | |
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/28/08  
 



Jörg Sellmeyer
whether The then in windows objectively on physical aufeinanderfolgenden Adressen described go, venture I To bezweifeln. the might of Defragmentierungszustand the Rams take down.


The physical Address sustain one eh never, only a Zuordnungsadresse (which often incorrectly as phy Addr verkannt becomes) and these changes itself - (but) according to Reservierungsmethode - usually up to a possible Redimensionierung not.

Ge DIM ter memory keeps means its address To it again Dim redimensioniert becomes or quite released.
 
08/28/08  
 



Peter Bierbachh
because at started one Program (here Profan) this space only yet for the a Program Profan present is.


this is a others reason wrong. eachone Process has so How so its own Adressbereich - talk we here but time only of NT. (and not of older Windowsversionen How z.B. 98 where the Speichergeschehen not yet so organisiert (sure) was.)

You can naturally too memory reservieren which for all processes available is - hold a question the manner the reservation.

Dim reserved unbeweglichen memory the for usually only erzeugenden Process available is, and naturally on übergeordneten Leveln z.B. if the Own Program whom UserMode leave. (How z.B. driver)
 
08/28/08  
 



@Peter: have You you yet a second Account zugelegt? (with 2 h end the Last name?)
 
08/28/08  
 



there's only the with the 2h. the a h wars I do not lane.
wished I already überberschreiben, then coming I do not More dran.

mfg
 
08/28/08  
 



who what in the computer power, is me really wurscht.

with the Speichergedöns should the self-appointed experts rumschlagen. isn't my world.
And if windows WinXP? of Aldi fetch, Hauptsache det Program runs.

mfg
peter
 
08/28/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

16.789 Views

Untitledvor 0 min.
funkheld05/22/16
Georg Teles01/09/16
H.Brill11/16/13
moefy09/04/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie