flat assembler
Message board for the users of flat assembler.
Index
> Main > Interesting task Goto page Previous 1, 2 |
Author |
|
bubach 28 Dec 2004, 12:36
what about mov:es to es=0xb800? but maybe it takes two bytes for each mov?
|
|||
28 Dec 2004, 12:36 |
|
Madis731 28 Dec 2004, 15:11
ok, Matrix we cry for help
I know you can DO it (I mean optimize it ) |
|||
28 Dec 2004, 15:11 |
|
bubach 28 Dec 2004, 15:56
Code: org 256 push 0xb800 pop es mov [es], 'H' mov [es+2], 'e' ; etc? is it to big? as far as i can remember a mov is 1 byte.. [edit] or not, as the char itself takes one byte and the address 1.. |
|||
28 Dec 2004, 15:56 |
|
vid 28 Dec 2004, 20:58
Quote:
surely not this case "mov" itself takes one byte, one byte for arguments, one byte for diplsacement, one for 'e' constant. |
|||
28 Dec 2004, 20:58 |
|
Nikolay Petrov 29 Dec 2004, 18:42
it's a funy
some small - 21 bytes: Code: org 256 mov dx,mess; 3 bytes mov ah,9 ; 2 bytes int 0x21 ; 2 bytes ret ; 1 bytes mess db "Hello World!$" ; 13 bytes 23 bytes Code: org 256 mov si,mess @@: lodsb int 0x29 cmp al,0x21 jne @r ret mess db "Hello World!" program name must be hello - 22 bytes Code: org 256 mov ah,2 mov dx,??? ;dh=row; dl=column int 0x10 mov dx,mess mov ah,9 int 0x21 ret mess db 'World!$' 16 bytes Code: ;if computer name is hello world! org 256 mov ax,0x5e00 int 0x21 mov si,dx mov cx,12; computer name - max 15 bytes @@: lodsb int 0x29 loop @r ret i don't check if the programe downloaded the text "Hello World!" from somewhere |
|||
29 Dec 2004, 18:42 |
|
jorom 01 Jan 2005, 23:11
The professor has agreed to accept this version:
hello.com: Code: mov ah,0Ah int 21h 4 bytes in command string: hello.com < text.txt There is the line "Hello World!" in the file text.txt (12 bytes) text.txt + hello.com = 16 bytes The version is odd, but I've not invented another |
|||
01 Jan 2005, 23:11 |
|
fasm9 02 Jan 2005, 01:28
Code: echo hello world! -- |
|||
02 Jan 2005, 01:28 |
|
THEWizardGenius 08 Feb 2005, 19:59
AFAIK 21 bytes is the smallest you can get in DOS... if it weren't for that "$" you could do 20... IMHO DOS should have had a PRINT string with null-terminator option... then it would be 20, because (hopefully) we can assume that after the program code will be all nulls.
|
|||
08 Feb 2005, 19:59 |
|
gumletis 11 Feb 2005, 08:28
thanks mike.dld i've just found out that you don't have to use GetCommandLine for getting the command line, but you can use 82h / 0x82 / $82 instead thanks!!
|
|||
11 Feb 2005, 08:28 |
|
fasm9 20 Feb 2005, 02:45
polygon7 wrote:
http://fabrice.bellard.free.fr/otcc/ Quote:
|
|||
20 Feb 2005, 02:45 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.