Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Slashdot Deals: Prep for the CompTIA A+ certification exam. Save 95% on the CompTIA IT Certification Bundle ×

Comment 6 bytes ! Beat that !!! (Score 1) 582

Yours does more than the article did. Yours actually prints hello world. Hers just returned 42. So I am sure you can do even better...

If it just has to return 42...

C:\>debug
-a 0100
0D3D:0100 MOV AH,4C
0D3D:0102 MOV AL,2A
0D3D:0104 INT 21
0D3D:0106
-rcx
CX 0000
:6
-n ben.com
-w
Writing 00006 bytes

-q

C:\>BEN.COM

C:\>echo %ERRORLEVEL%
42

Comment Re:How about 28 bytes?! (Score 3, Informative) 582

How about 22 bytes?

C:\>debug
-a 0100
0D39:0100 MOV AH,09
0D39:0102 MOV DX,0109
0D39:0105 INT 21
0D39:0107 INT 20
0D39:0109
-e 0109 'Hello world!$'
-r cx
CX 0000
:16
-n hello.com
-w
Writing 00016 bytes
-q

C:\>HELLO.COM
Hello world!
C:\>dir hello.com
26/08/2009 10:48 22 HELLO.COM

The value of a program is proportional to the weight of its output.

Working...