Pages: 1 2 [3] 4
|
 |
|
Author
|
Topic: Smallest Executable to write "Hello World" to the screen (Read 36506 times)
|
oex
Futurist EDIT: In Training
Member
    
Gender: 
Posts: 2008
Everything = Maths * Community2
|
It actually prints "Hello,World" for me, not space but comma, is that legal?  (I tried it with space and that worked also  ) PS. Does that mean I technically win 
|
|
|
Logged
|
We are all of us insane, just to varying degrees and intelligently balanced through networking http://www.hereford.tv
|
|
|
Antariy
|
It actually prints "Hello,World" for me, not space but comma, is that legal?  (I tried it with space and that worked also  ) This is correct - I used not space. For pure historical DOS, there is one more update  Alex
|
|
|
Logged
|
|
|
|
jj2007
|
Any idea why jmp word ptr ss:[82h] does not work?
|
|
|
Logged
|
|
|
|
Antariy
|
Any idea why jmp word ptr ss:[82h] does not work?
Because this is level of inderection - you jump not to address 82, but to address, which is specified in WORD placed at address 82. I guess my English not help...
|
|
|
Logged
|
|
|
|
Antariy
|
It actually prints "Hello,World" for me, not space but comma, is that legal?  By the way, you can enter very very very long (up to ~110 chars) string for printing - and this will have no influence for program size  P.S. you can edit .BAT file because it contain only printable chars.
|
|
|
Logged
|
|
|
|
GregL
|
Alex,
Your program + .bat file works on Vista (32-bit) too.
|
|
|
Logged
|
|
|
|
Antariy
|
Alex,
Your program + .bat file works on Vista (32-bit) too.
Thank you, Greg!
|
|
|
Logged
|
|
|
|
japheth
Guest
|
This "EB 80" 2-byte program was also discussed in the FASM forum: http://board.flatassembler.net/topic.php?t=10847here's the clean Masm version, without tricks like "JMP $-7Eh": CGROUP group PSP, _TEXT
PSP segment at 0 db 82h dup (?) cmdl: db 7eh dup (?) PSP ends
_TEXT segment 'CODE' start: jmp short cmdl _TEXT ends
end start
to be linked with "link16 /tiny ..."
|
|
|
Logged
|
|
|
|
dedndave
|
there is nothing wrong with this method, either... .MODEL TINY
_TEXT SEGMENT WORD PUBLIC 'CODE'
ORG 82h Branch:
ORG 100h _main PROC NEAR
jmp Branch
_main ENDP
_TEXT ENDS
END _main of course, you can use a Start: label instead of a _main proc, if you prefer thing is - if you need a batch file to get the results, i say you have defeated the purpose of the contest 
|
|
|
Logged
|
|
|
|
jj2007
|
thing is - if you need a batch file to get the results, i say you have defeated the purpose of the contest  You don't need a batch file, actually. But you should know how to use Alt nnn at the DOS prompt 
|
|
|
Logged
|
|
|
|
dedndave
|
i know how to do it  but, who can remember the sequences  it reminds me of booting a tape drive on a PDP11 with the front panel switches a sequence which i, at one time, had memorized - now happily forgotten at any rate, the point of the post: you don't need to open a segment at 0 for the PSP the code segment naturally encompasses the PSP in a .COM program
|
|
|
Logged
|
|
|
|
japheth
Guest
|
at any rate, the point of the post: you don't need to open a segment at 0 for the PSP the code segment naturally encompasses the PSP in a .COM program
You're right. I had the idea that with the AT segment there is no risk that a linker adds 256 null- bytes to "fill" the gap, but this isn't necessary. Also, some linkers won't accept an AT segment in a group.
|
|
|
Logged
|
|
|
|
Antariy
|
thing is - if you need a batch file to get the results, i say you have defeated the purpose of the contest  Well, since I saw that other programs uses passed string as Message, that why I cannot use passed string for code? The program itself is just vulnerable application, which allow execution of arbitrary code, code in shell-style.  So, my version is just from model line of: " http://www.masm32.com/board/index.php?topic=10252.msg125593#msg125593"  Alex
|
|
|
Logged
|
|
|
|
Antariy
|
This "EB 80" 2-byte program was also discussed in the FASM forum:
I'm have nothing to say contrary. For 30 years of DOS existence, I'm sure - thousands of peoples reinvent the same many times. Alex
|
|
|
Logged
|
|
|
|
japheth
Guest
|
I'm have nothing to say contrary. For 30 years of DOS existence, I'm sure - thousands of peoples reinvent the same many times.
My post was merely informational.
|
|
|
Logged
|
|
|
|
|
Pages: 1 2 [3] 4
|
|
|
 |