My ASM Program

Discussion in 'OT Technology' started by CyberBullets, Oct 17, 2003.

  1. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    I descided to post it on here for the hell of it. 1st "big" project i guess.

    all it is, is 2 chars < and > in red that move around the screen and stop at the end.

    the code is dirty i know that, but it works :bigthumb:

    we havent been taught to write clean asm, only to write what u know and learn by trying.


    tell me what u think.

    [edit]
    use dos 6.22 though ME to use this. dont try an NT based OS!!!
    [/edit]
     
    Last edited: Oct 17, 2003
  2. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Cyber: You assemble that file with multi-processor support? That file hosed my machine.
     
  3. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden

    shit i forgot to say that it runs on 98 only. fuck my bad guys....

    i just tried it on my xp box and it just crashed the cmd box...

    i think it has multiprocessor support... i started using it at school on our p4's, went home and finished it on my k6-2
     
  4. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    problem is that NT doesnt allow the program to access the video card directly, it crashes for that reason
     
  5. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I can't test your application, but I did peek at the code. How are you liking ASM? I assume learning it is more for fun and background than practical use.
     
  6. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yeah its more fun and games then anything else. today we wrote a primative piano using the keyboard. certian keys when press produced certian sounds. spacebar was my middle c (900Hz).

    it does have some practical use when used with other languages like C for subroutines (creating custom interupts) and so on.
     
  7. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Hmm... I ran it on my K6-2 box with Win98. I ran the program and the cursor disappeared. I hit a key and it brought me back to the command prompt. I exited the command prompt (it was full screen) Windows failed to return (mostlikely due to the app overwriting what it thought was video memory but was Windows). I'm running two video cards if that matters.
     
  8. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yes it overwrites the video memory (b800:0000).

    if u type cls it fixes the problem though.

    what i should of done was pushed the memory to the stack, clear the screen and once done pull it back from the stack
     
  9. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    I think I should have booted to DOS before running it. I ran it from within Windows (full screen mode though). I had full access at the command prompt. The cursor was alive. I was able to type. I could see text clearly. It was when I pressed enter on the command "EXIT" and it tried loading windows. The machine came to a complete stop. No mouse. No keyboard. No num-scroll-caps lock light switching. Waited for a minute with no hard drive activity and powered it down. I'm predicting my video memory does not sit at that address (but I'd predict a part of Windows does!). Oh well... The code looked cool though.
     
  10. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden

    hmmmmm i tried it off of a 95b bootdisk and it works... i really wanna figure out why its crashing systems...

    my next goal is to add sound. i got the code, i just gotta implement it.
     
  11. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    so i got bored and added sound! i also stopped it 1 from the bottom sooner so it wouldnt overwrite the cursor.

    it makes pc sounds when moves (low fi) and when it hits the wall (hi fi).

    so yeah, here is the code for those who are ;)

    i tried it on xp in a cmd and it ran... i could only hear the sound, no video.

    press any key cept the arrow keys to exit (arrow keys move it around)
     

Share This Page