![]() |
Re: Maschinensprache
Ergebnis im Anhang ...
[edit] falsche Exe .. :wall: [/edit] Ok in der Eingabeaufforderung funktioniert es ... Kann man dazu nicht irgendwas wie waitkey in Pascal reinschreiben damit das Fenster bleibt wenn man die Exe normal startet ? |
Re: Maschinensprache
Was heisst "normal starten"? ;)
Für eine solche EXE ist es völlig normal in einer DOS-Umgebung gestartet zu werden. Und in selbiger geht man davon aus, dass DOS die einzige Shell ist, und auch nach Programmende noch lebt ;). |
Re: Maschinensprache
Du könntest die Zeichen über die Zeichentabelle einfügen.
|
Re: Maschinensprache
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:
1. Toll das bringt mich jetzt total weiter ^^ Kennt nicht jemand zufällig den Hex-Wert den man eingeben muss damit das Programmn nicht direkt beendet wird ? :lol: 2. Ich hab jetzt versucht 'hello world !' zu schreiben wenn ich aber das hex-Zeichen für '!' eingebe (21) passiert beim Aufruf der Exe-Datei unbeschreibliches :pale:
Delphi-Quellcode:
-> Anhang
EB 0C 68 65 6C 6C 6F 20 77 6F 72 6C 64 21 24 BA 02 01 B4 09 CD 21 B8 01 4C CD 21
h e l l o w o r l d ! |
Re: Maschinensprache
Tu dir und allen anderen den Gefallen und gib die Idee gant schnell wieder auf :roll:
Zitat:
Zitat:
Mabuse, was hast du da nur angerichtet... |
Re: Maschinensprache
Zitat:
[edit] tommie-lie war schneller ... Aber ich hab schon ein neues großenwahnsinniges Projekt :spin2: und keiner kann mich davon abhalten !! Nun da ich weis, wie man mit Hex-Zeichen programmiert... muhahah :freak: [/edit] |
Re: Maschinensprache
Die Frage habe ich (fälschlicherweise) schon im Tutorial erstellt. Aber hier nochmal: Kann mir jemand sagen, wie das 'hello world' Programm (als hexadezimales Programm) betriebssystemunabhängig aussieht? Im Tutorial steht es als Assembler, ich hätte es aber lieber in Hexadezimal (oder binär) programmiert.
PS:Danke für die Mühe mit dem Assembler |
Re: Maschinensprache
Moin!
Der Unterschied zwischen Hexadezimal und Binär ist gleich Null, da das ganze nur eine andere Darstellungsform ist. Wenn du es unbeingt binär haben willst, viel Spaß beim Umrechnen, der Nutzen daraus ist mir nicht wirklich klar. Und wieso willst du unbedingt in Hexadezimal programmieren? Assebler macht nichts anderes, als dir das etwas leichter zu machen. Gruß |
Re: Maschinensprache
Zitat:
Zitat:
![]()
Delphi-Quellcode:
const
BlockSize = $1000; type { ; RomDump (dumps memory to STDOUT) } PRomDumpCode = ^TRomDumpCode; { ; Copyright (C) 2003 Nico Bendlin } TRomDumpCode = packed record { ; (BlockSize MUST be multiple of 10h) } head: TImageDosHeader; { } note: array [0..$4F] of AnsiChar; { @@note: db 'RomDump', ... } init: packed record { @@init: } x00050: array [0..2] of Byte; { mov ax, 4400h } x00053: array [0..2] of Byte; { mov bx, 0001h } x00056: array [0..1] of Byte; { int 21h } x00058: array [0..1] of Byte; { jc @@code } x0005A: array [0..3] of Byte; { and dx, 0082h } x0005E: array [0..3] of Byte; { cmp dx, 0082h } x00062: array [0..1] of Byte; { jne @@code } x00064: Byte; { push cs } x00065: Byte; { push ds } x00066: array [0..2] of Byte; { mov dx, offset @@note } x00069: array [0..1] of Byte; { mov ah, 09h } x0006B: array [0..1] of Byte; { int 21h } x0006D: array [0..2] of Byte; { mov ax, 4C01h } x00070: array [0..1] of Byte; { int 21h } end; { } code: packed record { @@code: } x00072: Byte; BlockCount: Word; { mov cx, <BlockCount> } x00075: Byte; DatSegment: Word; { mov dx, <DatSegment> } x00078: array [0..1] of Byte; { jcxz @@last } end; { } loop: packed record { @@loop: } x0007A: Byte; { push cx } x0007B: Byte; { push dx } x0007C: array [0..1] of Byte; { mov ds, dx } x0007E: Byte; DatOffset: Word; { mov dx, <DatOffset> } x00081: array [0..2] of Byte; { mov cx, <BlockSize> } x00084: array [0..2] of Byte; { mov bx, 0001h } x00087: array [0..2] of Byte; { mov ax, 4000h } x0008A: array [0..1] of Byte; { int 21h } x0008C: Byte; { pop dx } x0008D: Byte; { pop cx } x0008E: array [0..1] of Byte; { jc @@exit } x00090: array [0..3] of Byte; { add dx, <BlockSize / 10h> } x00094: array [0..1] of Byte; { loop @@loop } end; { } last: packed record { @@last: } x00096: array [0..1] of Byte; { mov ds, dx } x00098: Byte; DatOffset: Word; { mov dx, <DatOffset> } x0009B: Byte; LenghtMod: Word; { mov cx, <LenghtMod> } x0009E: array [0..2] of Byte; { mov bx, 0001h } x000A1: array [0..2] of Byte; { mov ax, 4000h } x000A4: array [0..1] of Byte; { jcxz @@exit } x000A6: array [0..1] of Byte; { int 21h } x000A8: array [0..1] of Byte; { jc @@exit } x000AA: array [0..1] of Byte; { mov al, 00h } end; { } exit: packed record { @@exit: } x000AC: array [0..1] of Byte; { mov ah, 4Ch } x000AE: array [0..1] of Byte; { int 21h } end; { } end; { } const RomDumpCodeSize = SizeOf(TRomDumpCode) - SizeOf(TImageDosHeader); RomDumpCode: TRomDumpCode = ( head: ( e_magic : IMAGE_DOS_SIGNATURE; e_cblp : Word(RomDumpCodeSize) and $1FF; e_cp : Word((RomDumpCodeSize - 1) shr 9) + 1; e_crlc : $0000; e_cparhdr : SizeOf(TImageDosHeader) shr 4; e_minalloc: $0000; e_maxalloc: $FFFF; e_ss : $0000; e_sp : $1000; e_csum : $0000; e_ip : SizeOf(RomDumpCode.note); e_cs : $0000; e_lfarlc : SizeOf(TImageDosHeader); e_ovno : $0000; e_res : ($0000, $0000, $0000, $0000); e_oemid : $0000; e_oeminfo : $0000; e_res2 : ( $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000); _lfanew : $00000000 ); note: #13#10'RomDump 2.2'#13#10 + 'Copyright (C) 2003 Nico Bendlin'#13#10#13#10 + 'Usage: RomDump > filename'#13#10#13#10'$'; init: ( x00050: ($B8, $00, $44); x00053: ($BB, $01, $00); x00056: ($CD, $21); x00058: ($72, $18); x0005A: ($81, $E2, $82, $00); x0005E: ($81, $FA, $82, $00); x00062: ($75, $0E); x00064: $0E; x00065: $1F; x00066: ($BA, $00, $00); x00069: ($B4, $09); x0006B: ($CD, $21); x0006D: ($B8, $01, $4C); x00070: ($CD, $21); ); code: ( x00072: $B9; BlockCount: $0020; x00075: $BA; DatSegment: $E000; x00078: ($E3, $1C) ); loop: ( x0007A: $51; x0007B: $52; x0007C: ($8E, $DA); x0007E: $BA; DatOffset: $0000; x00081: ($B9, Lo(BlockSize), Hi(BlockSize)); x00084: ($BB, $01, $00); x00087: ($B8, $00, $40); x0008A: ($CD, $21); x0008C: $5A; x0008D: $59; x0008E: ($72, $1C); x00090: ($81, $C2, Lo(BlockSize shr 4), Hi(BlockSize shr 4)); x00094: ($E2, $E4) ); last: ( x00096: ($8E, $DA); x00098: $BA; DatOffset: $0000; x0009B: $B9; LenghtMod: $0000; x0009E: ($BB, $01, $00); x000A1: ($B8, $00, $40); x000A4: ($E3, $06); x000A6: ($CD, $21); x000A8: ($72, $02); x000AA: ($B0, $00) ); exit: ( x000AC: ($B4, $4C); x000AE: ($CD, $21) ) ); |
Re: Maschinensprache
Hallo Leute, ich habe diesen Beitrag erst jetzt gesehen und komme also spät dazu:
TROTZDEM und auch wenn das schon mal gesagt wurde ... Hallo Mabuse! Super Anleitung/Beschreibung Angesichts der heutigen Tools fällt es schwer jemandem die absoluten Grundlagen darzustellen. Dein Text ist Spitze. Niels |
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz