AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi far; bei procedure - was sagt das aus?
Thema durchsuchen
Ansicht
Themen-Optionen

far; bei procedure - was sagt das aus?

Ein Thema von Helmi · begonnen am 23. Jul 2012 · letzter Beitrag vom 23. Jul 2012
Antwort Antwort
Benutzerbild von Helmi
Helmi

Registriert seit: 29. Dez 2003
Ort: Erding, Republik Bayern
3.312 Beiträge
 
Delphi XE2 Professional
 
#1

far; bei procedure - was sagt das aus?

  Alt 23. Jul 2012, 18:39
Hallo,

ich hab mir gerade einen Code einer Komponente angeschaut und da ist mir an einer procedure-Bezeichnung die "Erweiterung" (falls man das so nennt) far aufgefallen.

procedure DestroyLocals; far; Was macht das far?
mfg
Helmi

>> Theorie ist Wissen, dass nicht funktioniert - Praxis ist, wenn alles funktioniert und keiner weiss warum! <<
  Mit Zitat antworten Zitat
Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.351 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: far; bei procedure - was sagt das aus?

  Alt 23. Jul 2012, 18:46
Nix mehr, das gab es mal bei 16-Bit als Aufrufkonvention.
Sebastian Jänicke
Alle eigenen Projekte sind eingestellt, ebenso meine Homepage, Downloadlinks usw. im Forum bleiben aktiv!
  Mit Zitat antworten Zitat
Benutzerbild von Helmi
Helmi

Registriert seit: 29. Dez 2003
Ort: Erding, Republik Bayern
3.312 Beiträge
 
Delphi XE2 Professional
 
#3

AW: far; bei procedure - was sagt das aus?

  Alt 23. Jul 2012, 18:52
und für was war das gut?
mfg
Helmi

>> Theorie ist Wissen, dass nicht funktioniert - Praxis ist, wenn alles funktioniert und keiner weiss warum! <<
  Mit Zitat antworten Zitat
WM_CLOSE

Registriert seit: 12. Mai 2010
Ort: königsbronn
398 Beiträge
 
RAD-Studio 2009 Pro
 
#4

AW: far; bei procedure - was sagt das aus?

  Alt 23. Jul 2012, 18:57
Für weit (im Speicher) entfernte Sprünge.
könnte damit zusammenhängen:

http://stackoverflow.com/questions/3...d-far-pointers
Zitat:
The near and far keywords have its origin in the segmented memory model that Intel had before. The near pointers could only access a block of memory originally around 64Kb in size called a segment whereas the far pointers could go outside of that range consisting of a segment and offset in the that segment. The near pointers were much faster than far pointers so therefore in some contexts it paid off to use them.
Nowadays with virtual memory near and far pointers have no use.

EDIT: eher das:
http://stackoverflow.com/questions/1...word-in-delphi

Zitat:
As Ken White explained, it's only used in 16 bit applications.

As a 16 bit pointer only can address 64 kb of memory, memory segments are used to access more memory. The processor has four segment registers so it can have four active segments at the same time, a code segment (cs), a data segment (ds), a stack segment (ss) and an extra segment (es). Each segment is 64 kb, but they may address the same memory area or party overlap.

A near pointer is a 16 bit pointer inside the same segment. It's used as a pointer to data or code in the same module.

A far pointer is a 16+16 bit pointer consisting of a 16 bit segment offset and a near pointer. It's used as a pointer to data or code in a different module. When you use a far pointer to call a procedure, the segment part is put in the cs and ds registers (IIRC) to access the code and data in that module.

The physical address of a segment+pointer pair is calculated as segment * 16 + pointer. That means that a 16 bit program can address 1024 kB of memory. To get access to more memory the two techniques of extended and expanded memory is used. (Also the high memory technique to some extent, where the address would not wrap at a 1 MB barrier, but using the segment offset FFFF would give you direct access to 65520 bytes of extended memory.)
Delphi programming

Geändert von WM_CLOSE (23. Jul 2012 um 19:02 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:05 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz