[ASM] Tiny Program :P

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! onemorejosh is offline
    MemberRank
    Apr 2009 Join Date
    BC, CanadaLocation
    246Posts

    [ASM] Tiny Program :P

    Here's a 47 byte program that'll show a full-screen design, wait for a keypress, and then exit. (May not work in Vista if Vista doesn't support full screen)

    C:\>debug a.com
    File not found

    -a
    0B33:0100 mov ax,13
    0B33:0103 int 10
    0B33:0105 mov ax,a000
    0B33:0108 mov ds,ax
    0B33:010A xor di,di
    0B33:010C xor ax,ax
    0B33:010E xor bx,bx
    0B33:0110 mov dx,bx
    0B33:0112 and dx,ax
    0B33:0114 mov [di],dl
    0B33:0116 inc di
    0B33:0117 inc bx
    0B33:0118 cmp bx,13f
    0B33:011C jna 110
    0B33:011E inc ax
    0B33:011F cmp ax,c7
    0B33:0122 jna 10e
    0B33:0124 xor ax,ax
    0B33:0126 int 16
    0B33:0128 mov ax,3
    0B33:012B int 10
    0B33:012D int 20
    0B33:012F
    -r cx
    CX 0000
    :2f
    -w
    Writing 0002F bytes
    -q

    C:\>dir a.com
    Volume in drive C has no label.
    Volume Serial Number is 0000-0000

    Directory of C:\

    04/13/2009 06:36 PM 47 A.COM
    1 File(s) 47 bytes
    0 Dir(s) 41,004,052,480 bytes free


    (type "a" <enter> to run it :P)

    if you beat it, add me onemorejosh@live.com :P


  2. #2
    Extreme Coder - Delphi bounty-hunter is offline
    MemberRank
    Sep 2007 Join Date
    GunZone MansionLocation
    1,725Posts

    re: [ASM] Tiny Program :P

    i beat it but ur not online on msn -__-

  3. #3
    Account Upgraded | Title Enabled! onemorejosh is offline
    MemberRank
    Apr 2009 Join Date
    BC, CanadaLocation
    246Posts

    re: [ASM] Tiny Program :P

    Yes i am, and you're not blocked, so dunno why you aren't seeing me

  4. #4
    i didnt do this. Donkjam is offline
    MemberRank
    Jul 2007 Join Date
    4,494Posts

    re: [ASM] Tiny Program :P

    Lol so its a game?

  5. #5
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    Re: [ASM] Tiny Program :P

    Yum, the wonderful world of 16-bit ASM programming :D, I should continue learning it...especially with all those interrupts, I keep forgetting which is which and their parameters hehe. Beside that, 16-bit is old and it might be better to focus on 32-bit...but it's still fun ;)

  6. #6
    Ginger by design. jMerliN is offline
    MemberRank
    Feb 2007 Join Date
    2,497Posts

    Re: [ASM] Tiny Program :P

    Do it in x86-64 yo.

  7. #7
    Account Upgraded | Title Enabled! onemorejosh is offline
    MemberRank
    Apr 2009 Join Date
    BC, CanadaLocation
    246Posts

    Re: [ASM] Tiny Program :P

    debug.exe only supports 16 bit :P

    ---------- Post added at 05:27 PM ---------- Previous post was at 05:20 PM ----------

    but as a bonus, here's how to shade it nicely too :P

    0BC5:0100 mov ax,13
    0BC5:0103 int 10
    0BC5:0105 mov ax,a000
    0BC5:0108 mov ds,ax
    0BC5:010A xor di,di
    0BC5:010C xor ax,ax
    0BC5:010E xor bx,bx
    0BC5:0110 mov dx,bx
    0BC5:0112 and dx,ax
    0BC5:0114 mov [di],dl
    0BC5:0116 inc di
    0BC5:0117 inc bx
    0BC5:0118 cmp bx,13f
    0BC5:011C jna 110
    0BC5:011E inc ax
    0BC5:011F cmp ax,c7
    0BC5:0122 jna 10e
    0BC5:0124 xor ax,ax
    0BC5:0126 mov dx,3c8
    0BC5:0129 out dx,al
    0BC5:012A inc dx
    0BC5:012B out dx,al
    0BC5:012C xor al,ff
    0BC5:012E out dx,al
    0BC5:012F xor al,ff
    0BC5:0131 out dx,al
    0BC5:0132 inc al
    0BC5:0134 jnz 12b
    0BC5:0136 int 16
    0BC5:0138 mov ax,3
    0BC5:013B int 10
    0BC5:013D int 20
    0BC5:013F
    -r cx
    CX 002F
    :3f
    -w
    Writing 0003F bytes

    ...It's up to 63 bytes tho :)
    06/20/2010 05:27 PM 63 A.COM

  8. #8
    Account Upgraded | Title Enabled! ~Delta is offline
    MemberRank
    Mar 2010 Join Date
    271Posts

    Re: [ASM] Tiny Program :P

    wow ASM is so confusing compared to java or c++.

  9. #9
    Account Upgraded | Title Enabled! Carrino is offline
    MemberRank
    Mar 2010 Join Date
    1,114Posts

    Re: [ASM] Tiny Program :P

    Omg it's ASM.
    The most confusing programming language I have encountered in my life.

  10. #10
    Super Mexican Joser is offline
    MemberRank
    Jun 2008 Join Date
    Your mom's roomLocation
    1,656Posts

    Re: [ASM] Tiny Program :P

    Screenies pl0x :D

  11. #11
    Alpha Member Moogly is offline
    MemberRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,322Posts

    Re: [ASM] Tiny Program :P

    Quote Originally Posted by Carrino View Post
    Omg it's ASM.
    The most confusing programming language I have encountered in my life.
    Try developing in binary. ;)

    Also, a screenie would be nice.

  12. #12
    Account Upgraded | Title Enabled! onemorejosh is offline
    MemberRank
    Apr 2009 Join Date
    BC, CanadaLocation
    246Posts

    Re: [ASM] Tiny Program :P

    Ok, here's links to screen captures...

    The unshaded one:
    http://millionairemindseminars.com/Capture1.PNG

    The shaded one:
    http://millionairemindseminars.com/Capture2.PNG

    ...Then you can sign up for a millionaire mind seminar afterwards :P
    Attached Images Attached Images



Advertisement