Archiv verlassen und diese Seite im Standarddesign anzeigen : entry point
Ich hab paar Codes aus einem Buch compeliert.
Da kommt aber immer so ein komischer Fehler:
"no programm entry point" oder so ähnlich.
Wieß einer was ich falsch mach!!
Kann es sein das du am anfang kein label hast?
z.b
.code
start: <--
nop
end start <---
Suppenkoch
02.01.2001, 20:34
Wo wir grad dabei sind: Was GENAU ist eigentlich ein Entry-Point?
Nehmen wir als Beispiel das Ausführen einer EXE-Datei unter DOS.
1. Laden der EXE-Datei vom Medium in den Hauptspeicher.
2. Segmentreferenzen ausbessern, d.h. überall wo zB auf Startsegment+2 verwiesen wird, muss das tatsächliche Segment eingesetzt werden. Dient dazu, damit auch Programme > 64 kB ausgeführt werden können.
3. Dann wird zB per JMP zum Entry-Point gesprungen, wo dann die Codeausführung beginnt.
Somit ist die Funktion des Eintrittspunktes verständlich...
; use ; to put comments in the assembler program
.MODEL SMALL; memory model
.STACK; memory space for program instructions in the stack
.CODE; the following lines are program instructions
mov ah,1h; moves the value 1h to register ah
mov cx,07h; moves the value 07h to register cx
int 10h;10h interruption
mov ah,4ch; moves the value 4 ch to register ah
int 21h; 21h interruption
END; finishes the program code
das ist der code. hab ich aus einem tut.
Der soll die größe des cursors verändern
Ich benutz den Turbo assembler von Borl.
.MODEL SMALL
.STACK
.CODE
START: ;Dein Assembler muss ja wissen wo der code anfäng
mov ah,1h; moves the value 1h to register ah
mov cx,07h; moves the value 07h to register cx
int 10h;10h interruption
mov ah,4ch; moves the value 4 ch to register ah
int 21h; 21h interruption
END START; finishes the program code
Das Prog is so klein da könntest du auch ne COM Datei draus machen
jo thx jetzt funzt. Start kann doch irgendwie heißen oder
Ja, die kannst für start auch was anderes nehemn, musst halt nur wieder am schluß ein end davor schreiben.