1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Assembly language on windows pls help

Discussion in 'Software Development' started by acedar, Sep 3, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. acedar

    acedar Thread Starter

    Joined:
    Feb 6, 2004
    Messages:
    4
    Hello,
    I am an old z80 programmer and i wish to write a game in assembly language under windows. But i do not know when to begin. it is difficult to find some help on it.
    I will be gratefull if someone can help me. I need an example (commented souirce code will be the best). For example a little cat (like diko) that walks on the desktop. Analizying such code will teach me everything i need (this means: movement and transparency on the windows desktop, method on how to make an windows executable, addressing the desktop...).
    Please help. i have great ideas. i want to make some freeware games for the desktop. Small and fast.
    Unfortunatelly i do not know any other language except Quick Basic (too basic for this), turbo pascal (too big files after compiling) and assembly.

    Thank you in advance for any help on how to do this.
    --
    . __ _ _
    .|\ / |_ | \ |\ |_\
    .| \ \ |__ |_/ | \ | \
     
  2. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    Hi acedar,

    A very long time ago, I wrote Z80 programs for the Sinclair ZX81. At this moment, I had the bible of Z80 (Rodnay Zachs, if my memory is good).
    Now, if you want to write assembly x86 based codes, you have just to forget the old mnemonic. You' ll understand when you see the tutorial at this site :
    http://en.wikipedia.org/wiki/X86_assembly_language
    I found out a site from where you can download an emulator to learn the x86 assembly : http://www.programfiles.com/Default.asp?LinkId=19728
    Just have a look, it seems interesting and good luck !
     
  3. acedar

    acedar Thread Starter

    Joined:
    Feb 6, 2004
    Messages:
    4
    Thank you Chicon.

    Your reply is very helpfull for me. And i found on one of theses pages a link to source codes in assembly.

    Did you know where can i found a call procedures of windows (you know, what call to make to write on screen, what call for getting keystroke etc.) ?

    As i said, i am old date z80 programmer and it was a bible of calling procedures for my old Amstrad. So it was easy to use a call for getting keystroke or for other job. But i am unable to find such information for windows. I am on windows 98 and i think thet because of compatibility, a majority of calling procedures will probably work on XP too.
    Without this info it will be very difficult for me to do something on windows desktop.

    --
    /\ < [ |) /\ |2
     
  4. Chicon

    Chicon

    Joined:
    Jul 29, 2004
    Messages:
    6,650
    As both Windows 98 and Windows XP are written in C++ (XP contains around 40 millions C++ coding lines), I suggest you to have a try with C++. It is fast though it is less close to CPU than x86 language.
    You can find free tools like Dev C++ to make tests and many tutorials to create your own executable files, your own dll's.
    Frankly, I have no clue how interrupt requests, stack pointer, registers, accumulator are managed in a Windows systems. And the difference between Z80 and x86 CPU is to be like the difference between a 2nd World War Junker and a Boeing 747.
     
  5. jamesh2923

    jamesh2923

    Joined:
    Aug 22, 2004
    Messages:
    135
    There are many sources of information on programming in Windows.
    Try : Windows Programming with C++

    Get a subscription to MSDN for access to many of the MS tools and Libraries.

    You will find it very difficult to write Windows programs in assembler. One reason being is that W2k and Win XP use Hardware abstraction. You do not have direct access to the Hardware.

    The MS C, C++ compilers are very good. MASM hasnt been updated for 10 yrs.

    You will find very little need for assembly programing.

    Learn C++ and C#.
     
  6. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    Nasm is the assembler I would look into.

    As already said, you should look into c++ for games. If you need something in the game to be ultra-lite and fast, use assembly if c++ methods won't cut it. (Like sound engines etc.).
     
  7. acedar

    acedar Thread Starter

    Joined:
    Feb 6, 2004
    Messages:
    4
    First of all thank you for your suggestions.

    I will try to learn C++ but i do not like him (dont ask why, because i do not know....). Little explanation: Many years ago (around 1992) it was two languages that was promised to the future - Turbo Pascal and C. So i choosen to learn the Turbo Pascal as it was more clean programming language. Unfortunatelly, some years after i understand that my choice was the wrong one because there was no any support for Turbo Pascal in Windows systems. Meantime C language begins evolution to C+ and C++

    Now i wish to program in Assembler because it is very small and fast. C++ programs are very large and there is problems with libraries. Many times i can not execute a programm because of MSVCRT incompatibility.

    And for the Assembly programming under windows i think that you are not totally right. I explain myself: you are right that it will be very difficult to programm directly sound engine or graphics because of a lot of different sound cards and music cards. So why, windows has many entry points (function calls) adresses that do the whole job. And i am researching the information on theses entry points. As i see in one of examples found on the net, i have to make my thread (it is like interruption call under Z80 - and to be more precise, it is like RST x instruction). For example i have to create a thread (interruption call) with entry datas in registers and aftre making a call to (for example) keyboard asking function, the call procedure remplies some registries and return throught them the information if the key was pressend or not. I imagine that it is the same way in windows (in every computer), but it is more elaborated here so i can not do anything without the reference book. I will keep searching and meantime i will try to learn C++ because i am learning JAVA now and C++ is very close to it (or Java is close to c++ :) ).

    Thanks to everybody here.

    It is good idea to write some basic lines as SIG :) My I ??

    --
    10 a$="|NAHDFN5YD5{NJA5|D[AI&YMN5EJXY5BX5\JYHMBGL5RD^&JGI5YMN5O^Y^[N5BX5MN[N5gND"
    20 for x=1 to 73
    30 b$=b$+chr$((asc(mid$(a$,x,1)) xor 170)-127)
    40 next x
    50 print b$
    run
     
  8. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    It's totally possible to make games all in assembly. It's been done before. You know that. It just prabably is not going to be fun if you are doing something large like Doom III/other.

    While you are at it though, develop a KHTML-based rendering engine for windows all in assembly so we Windozes users can have a FAST KHTML-bases browser. :)

    Just keep in mind that a program made in assembly will not always be faster than a program made in c++. The binary will most likely be smaller with assembly though.

    If you do develop a serious game, try using openGL or anything that can be easily ported to linux etc.

    Anyway, you did ask for an assembly example. I don't have one, but I'll have a look-see.
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Assembly language windows
  1. Joe Hudson
    Replies:
    4
    Views:
    756
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/269827

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice