AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Inline asm AV

Ein Thema von Neutral General · begonnen am 4. Feb 2007 · letzter Beitrag vom 4. Feb 2007
Antwort Antwort
Seite 1 von 2  1 2      
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Inline asm AV

  Alt 4. Feb 2007, 15:33
Hi,

Mir fällt jetzt kein besserer Titel ein
Also ich hab auf ner Seite gesehen das man mit int 13h und entsprechenden Parametern auslesen kann ob ein Laufwerk bereit ist.

Zitat:
HARD DISK - CHECK IF DRIVE READY

AH = 10h
DL = drive number (80h = first, 81h = second hard disk)

Return:
CF set on error
CF clear if successful
AH = status (see #00234 at AH=01h)
Delphi-Quellcode:
function GetDriveReady: Byte; assembler;
asm
  mov AH,10h
  mov DL,80h
  int 13h
  mov Result,AH
  ret
end;
Ich hab ja nicht wirklich Ahnung von Assembler aber was mache ich da falsch? Ich bekomme wenn int 13h aufgerufen wird ne AV

Zitat:
---------------------------
Project1
---------------------------
Access violation at address 0044D94C in module 'Project1.exe'. Read of address FFFFFFFF.
---------------------------
OK
---------------------------
Kann mir einer sagen was ich falsch mache ?

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von inherited
inherited

Registriert seit: 19. Dez 2005
Ort: Rosdorf
2.022 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: Inline asm AV

  Alt 4. Feb 2007, 15:38

Das ist das geilste, was ich seit langem gesehen habe. Na, was haben wir über Interrupts gelernt?
Nikolai Wyderka

SWIM SWIM HUNGRY!
Neuer Blog: hier!
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#3

Re: Inline asm AV

  Alt 4. Feb 2007, 15:40
Ich noch so ziemlich gar nix und deswegen würd ich eher ne Antwort haben, am besten mit Erklärung statt ne dumme Bemerkung -.-
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Daniel G
(Gast)

n/a Beiträge
 
#4

Re: Inline asm AV

  Alt 4. Feb 2007, 15:43
Zitat von inherited:
Das ist das geilste, was ich seit langem gesehen habe.
*plonk* Das hat rootforum-Niveau

@NG: Du kannst unter WindowsXP nicht mehr im Usermode auf die Interrupts zugreifen. Dazu musst du schon in den Kernelmode. (imho )
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: Inline asm AV

  Alt 4. Feb 2007, 15:44
Bestimmte Interrupts sind noch erlaubt, oder? *kratz*

Außerdem, gibt das nicht normalerweise nen "Privilegierte Anweisung"-Fehler?
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

Re: Inline asm AV

  Alt 4. Feb 2007, 15:46
grml...k
Und wie kommt man in den Kernelmode?
Oh man immer wieder denk ich mir: "Ok - Lerne ich jetzt mal Assembler.. Is manchmal bestimmt ganz nützlich.." Und jetzt kann man damit ma wieder rein gar nix machen -.-
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#7

Re: Inline asm AV

  Alt 4. Feb 2007, 15:46
Mit Delphi: Am besten gar nicht.

Glaub mir: Du willst NICHT wissen, was der Delphi-Speichermanager mit deinem Kernel anstellt. Ich will es auch nicht.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
Daniel G
(Gast)

n/a Beiträge
 
#8

Re: Inline asm AV

  Alt 4. Feb 2007, 15:49
Zitat von Neutral General:
Und wie kommt man in den Kernelmode?
Am Besten mit einem Treiber.

Genaues weiß ich aber nicht, und Halbwissen möchte ich nicht verbreiten.

Geht es nur um's lernen? Sonst könnte man ja versuchen, das Problem anders zu lösen...
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#9

Re: Inline asm AV

  Alt 4. Feb 2007, 16:08
Ja würde halt gerne bisschen besser Assembler können... die ganzen Tutorials sind mir meistens zu kompliziert geschrieben und naja dann hab ich ne Seite gefunden wo die ganzen interrupts dokumentiert waren und dann wollt ich den ein oder anderen mal ausprobieren...
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#10

Re: Inline asm AV

  Alt 4. Feb 2007, 16:13
Dazu würde ich dir dann zu Turbo Pascal raten und darin üben. Dieses läuft auf dem 16 Bit SubSystem und dort sind die Interrupts angeboten. Du kannst bei Borland z.B. TP5.5 kostenlos runterladen.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


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 19:21 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