Autor Beitrag
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: So 07.03.04 23:18 
Hi,

Ich möchte im Deplhi Inline Assembler ein LAbel deklarieren..

Laut Delphi Hilfe ist ein LAbel ein Striong der mit einem "at" Zeichen beginnt...
Aber da funktioniert was bei mir nicht :-(

Nur, wenn ich sowas eingebe:
Es wird das AX-Register bis auf den Wert von BX hochgezählt... Ich weiss nicht sehr sinnvoll. :roll:
Aber fürs erste eigene Assemblerprogramm ;-)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure Testfunktion;
asm
mov bx,5
mov ax,0
@test;     // FEHLER !!!!!
inc ax
dec bx
jnz bx,test
nop
end;


kommt die Fehlermeldung vom Compiler :

ausblenden Quelltext
1:
[Error] Unit1.pas(71): Inline assembler syntax error					


Wie werden denn Labels korrekt gesetzt, oder mach ich was anderes falsch ????


Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 07.03.04 23:24 
So sollte es gehen..
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure Testfunktion;
asm
    mov bx,5
    mov ax,0

  @@test:
    inc ax
    dec bx
    jnz bx,test
    nop
end;

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
catweasel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: So 07.03.04 23:29 
Also, es hat auf jeden Fall schonmal geholfen :)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure Testfunktion; 
asm 
    mov bx,5 
    mov ax,0 

  @@test
    inc ax 
    dec bx 
    jnz bx,test   // FEHLER !!
    nop 
end;


Nun sagt er das "test" ein undeclared Identifier sei... :-(

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 07.03.04 23:54 
So.. jetzt müsste es aber gehn..
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure Testfunktion; 
asm 
    mov bx,5 
    mov ax,0 

  @@test
    inc ax 
    dec bx 
    jnz @@test
    nop 
end;

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
catweasel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: Mo 08.03.04 02:18 
Juhuuu !!!!! :D
Es gibt zumindest keine Fehlermeldungen mehr :-) Zu sehen gibts ja nicht vie l.. Aber der wird das schon machen, oder gibts da ein debug-fenster mit dem ich das Mitverfolgen kann ?

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.