Results 1 to 23 of 23

Thread: Why learn assembly, where to get good tutorials?

  1. #1

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Arrow

    Why would VB programmer want to learn Assembly Lang.?
    Are there any special reasons, if so where can i find good tutorials.


    Thanks.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    Grand Rapids, MI
    Posts
    231

    should be "why would any programmer learn ASM"

    well for one, you can do anything in ASM, ASM is about the lowest level programming you can get into, many C++ programmers learn some ASM to include in their code, benefits of ASM is its extremely small size(when compiled) and extremely fast speed, many virus writers will use ASM (even tho it's not intended) ASM is about as close as you'll get to writing actual machine code, with ASM you program the calls direct to the registers of the CPU, so you have nearly absolute control as long as you know what you are doing. I dont know ASM , but I know it's benefits.
    -Karl Blessing aka kb244{fastHACK}
    [email protected]

  3. #3
    New Member
    Join Date
    Jul 2000
    Posts
    6
    Here's a tutorial I found the other day:


    http://webster.cs.ucr.edu/Page_asm/A.../ArtofAsm.html

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    MASM32

    lots of code for windows apps in asm

    http://www.pbq.com.au/home/hutch/masm.htm
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  5. #5

  6. #6
    New Member
    Join Date
    Sep 2000
    Location
    Posts
    2

    Lightbulb Why you should learn some assembly

    Assembly allows you to write compact code and to the point. I needed to send some code to a printer one time, I wrote it in Machine code. The file was only 10 bytes!!! If I would have written in any other language, It would have been at least 1k because of all the overhead high level languages have to put in.
    Back when PC's were slow, it was the best way to speed things up, especially graphic work. It still has many uses today.
    Also, you need to know what you are doing, it's easy to crash your PC if you forget a register pointer or something.

    If you write gaming code, you WILL, or you should in some instances have Assembly routines.

    Have Fun.
    Stuart

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think a lot of programmers just use asm for speed rather than size for most programs, unless size is of the essence.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11

    Thumbs up Of cource there is a good ide' to learn ASM it's very easy to learn

    Some Easy Asm vs. C examples

    Set a value to a variable named A
    A=0; .C
    mov A,0 .Asm

    Increase A
    A++; .C
    inc A .Asm

    Add A with B
    A=A+B .C
    add A,B .Asm

    Multiply
    A=B*6; .C
    mov eax,B .Asm
    imul eax,6 .Asm
    mov A,eax .Asm

    Eax is a kind of predefined variable in the CPU

    If U use VB and Need some more speed, make a Win32 Dll file in Assembler and load it from VB.

    Try Pass32
    http://www.geocities.com/SiliconValley/Bay/3437/
    Assembler is more then a Language, it's a Religion

  9. #9
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Originally posted by parksie
    I think a lot of programmers just use asm for speed rather than size for most programs, unless size is of the essence.
    ASM's best use in my opinion is in languages that can use it inline, so you can have a function or sub with a really entensive loop coded as ASM into the normal source of your program. Coding an entire app in ASM seems a bit excessive, after all you're still making calls to the API written in C so your better just optimising areas of the app that require it.

    That's one of the reasons I like powerbasic
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    And for things that you can't do in C/C++. (see my thread in the C++ forum about inline asm).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11

    Thumbs up

    A inline Assembler means much, but the way I see it
    assembler is easier to use because it's logical and clean
    In a non Assembler Language the programmer of the Language
    have made some changes to make it easier to Use(when you know it), but also less logical

    The point is that Assembler does not have to be harder to work with then
    a non Assembler Language
    With a good Macro Assembler and a good editor
    The Assembler code will look like basic

    A simple Pset Macro Example
    ;not working just to show the principle and power of macro

    .Code

    Proc MainAsm
    pset(100,100,Black)
    Endp MainAsm

    .Macro Pset(X,Y,Color)
    ;Code to set a pixel
    Endm Pset

    U save all the macros into a include file and then they will appear like basic commands
    A macro assembler is Like a Assembler with a inline Basic
    Assembler is more then a Language, it's a Religion

  12. #12
    Guest
    I just wanna say once you write a full app in ASM, the sheer size of it makes you feel good. Then the added speed puts you on could 9.

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    ...and the weather's really fine, up on Cloud Number Nine.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Lively Member
    Join Date
    Jun 2000
    Posts
    122
    I read in a book one time that you should only learn assembler if you have mastered at least one language(perferably C/C++). What do you think? I have just begun to learn Assembly and it doesn't seem that hard, so far, and I have only been doing C++ for about a month and a half and VB for 1 year now.

  15. #15
    Guest
    ASM isnt that hard, especially for windows. If you know the api, its pretty easy.

  16. #16
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    That's why a language which supports inline ASM is good, it sort of eases you into it and you can use it where you want.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  17. #17
    Guest

    Smile

    heheh - I have been learning Assembly lanuage at college today. Wrote some C scripts in linux

  18. #18
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Hey Das Mad!
    How can I implement those macros to my VB code?
    Sanity is a full time job

    Puh das war harter Stoff!

  19. #19
    New Member
    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    11
    Well, you can not use Asm macros direct in VB, what I meant was that
    when programming in Asm you can use macros that will make the asm look like Basic.

    However by making a Win32 DLL in assembler
    and calling it from VB you can get the same effect(almost).

    There are languages that got a asm built-in(a inline assembler C,C++,Pascal,Delphi,PowerBasic)
    That means that you don't have to make a DLL to get asm speed

    There are some things that you need to know about Win32 DLL's
    Not anything hard if you are familiar with asm
    Assembler is more then a Language, it's a Religion

  20. #20
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Hm actually I'm not very familiar to ASM, but I really think I should get more familiar to it, cause it is very easy to learn the basics of it. Hm So i'll first learn some easy stuff, than I'll try to write my first Dll. Would be so cool adding some fast graphic stuff to my boring games lol! In one of the posts here there was a real good link to an online learning book. Anybody here who knows a good program to download the whole page with links. (not the IE thing, I want more options!)
    Sanity is a full time job

    Puh das war harter Stoff!

  21. #21
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Teleport Pro
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  22. #22
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    thanks! is it freeware? were can I get it? Has it a hp?
    Sanity is a full time job

    Puh das war harter Stoff!

  23. #23
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    not sure,

    I downloaded it about 3 years ago and still use it. captures java too.

    I registered it online
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width