Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

How to begin using ASM: Paul, Scott, Clay?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to begin using ASM: Paul, Scott, Clay?

    Hi folks, I have been working in PB now for a while, and programming
    in general for years. Always DOS, always basic (dabbled in C).
    I have done ASM back in the days of C64 and Z80, but I have never
    carried it forward (don't mind the pun) into PC/DOS. I have hit
    that point where it's more than a bit overdue. But where to begin?!?

    It is clear enough that PB3.5 is a great 'wrapper' for this kind of
    work, but it's really not so obvious where to start with the basics.
    I would really appreciate it if you good folks could reccomend any
    quality on-line resources (preferable for the low cowst aspect), or
    any absolutely fundamental books. I don't know the x86 core architecture
    from an assembly point of view, but like learning C, the core language
    means very little out of context of it's environment, which is why I'm
    asking you guys, hoping to find a good starting point that is
    realatively in-context.

    I hope I haven't asked for something that's right under my nose.



    ------------------
    What can go wrong will go wrong.
    Anything can go wrong.
    What hasn't?!?!
    What can go wrong will go wrong.
    Anything can go wrong.
    What hasn't?!?!

  • #2
    This might be a good place to start:

    http://www.powerbasic.com/files/pub/asm/

    ------------------
    Adam Drake
    Drake Software

    Comment


    • #3
      Criss,

      I am sorry, but I cannot provide you with any references.
      I have always taught myself how to program, which is one of the
      reasons that my programming "style" is so "off-the-wall." Of course,
      the other Forums members have been a great help, also. Paul
      seems very well versed in the lore of PC ASM, so he can probably
      give you some references. But, it's been my experience that
      he usually does not answer my posts until around 4:00 - 5:340 AM,
      Central Time, USA. So, he might not reply to this thread until
      tomorrow.

      I am sorry that I could not be of help.


      ------------------

      Comment


      • #4
        criss,
        <<or any absolutely fundamental books>>

        the same as i just mentioned to clay in the other thread. if you want dos (16 bit)asm then:
        http://www.powerbasic.com/support/pb...read.php?t=993

        paul.

        Comment


        • #5
          Of the many web resources available, Randall Hyde's _Art of
          Assembly Language_ offers an excellent place to start:
          http://webster.cs.ucr.edu/AoA.html

          Any programmer can benefit from study of assembly language
          because learning ASM necessitates learning something about the
          hardware, and a reasonable understanding of hardware has always
          distinguished the best programmers.


          ------------------
          -- [email protected] --

          Comment


          • #6
            I have a 16-Bit ASM book, but can't remember the name of it. It has
            been packed away for awhile now, since I have been doing mostly 32-bit
            stuff. Gavin's isn't too bad, they are at: http://burks.bton.ac.uk/burks/langua...smtut/asm1.htm

            You can also try the Assembly Programming Journal at: http://asmjournal.freeservers.com/

            Should you decide to go 32-bit, definately check out Hutch's MASM32 at: http://www.movsd.com/

            and Iczelion's Tutorials at: http://win32asm.cjb.net/

            Should be enough to get you started...


            ------------------
            Scott Slater
            Summit Computer Networks
            www.summitcn.com
            Scott Slater
            Summit Computer Networks, Inc.
            www.summitcn.com

            Comment


            • #7
              Originally posted by Criss French:
              Hi folks, I have been working in PB now for a while, and programming
              in general for years. Always DOS, always basic (dabbled in C).
              I have done ASM back in the days of C64 and Z80, but I have never
              carried it forward (don't mind the pun) into PC/DOS. I have hit
              that point where it's more than a bit overdue. But where to begin?!?


              I agree that Randall Hyde's stuff is extremely good and covers
              volumes of material very well. Highly recommended.
              A good book, less forbidding than the >1500 pages by Hyde, is
              "Assembly Language for Intel-Based Computers" by Kip R. Irvine.
              The new edition has just come out and his web-site is also helpful.
              Good luck!
              Regards,
              Gunar.


              ------------------

              Comment


              • #8
                Thank you all very much. I have started on enough free learning
                material that if I can't get it, we can all chalk one up to failed
                evolution or somesuch

                I am really glad that I asked.

                For anyone curious, my first dream project is an interrupt driven
                serial handler for GPS receivers. I envision a FIFO with the
                ability to dump older data blocks in case of buffer overflow,
                plus possibly the option of streaming raw to file in the
                background. User adjusted everything, including the marker used
                to spot the beginning of data blocks.
                I'll post it here if I do it.
                What can go wrong will go wrong.
                Anything can go wrong.
                What hasn't?!?!

                Comment


                • #9
                  Criss,

                  You can't do ISR's in PB-DOS. You will need to do the Interrupt
                  handler with an Assember (Not PB's Inline). You may be able to make
                  these assemby files use the Large Memory Model, and then link to the
                  OBJs with your PB-DOS program. I'm not sure if PB-DOS will like an
                  OBJ linked to it with an ISR in it.... Lance? Tom?


                  ------------------
                  Scott Slater
                  Summit Computer Networks
                  www.summitcn.com
                  Scott Slater
                  Summit Computer Networks, Inc.
                  www.summitcn.com

                  Comment


                  • #10
                    scott,
                    <<you can't do isr's in pb-dos. you will need to do the interrupt handler with an assember (not pb's inline). >>

                    not true, i've done them in pb/dos using the pb inline assembler without problems.
                    i'm sure a search of these forums will find such routines.

                    paul.

                    ps such as: http://www.powerbasic.com/support/pb...read.php?t=547



                    [this message has been edited by paul dixon (edited march 04, 2003).]

                    Comment


                    • #11
                      ISR's are possible in PowerBASIC, but there are strict conditions - the ISR routine should be only inline-ASM and should not use any BASIC statements/Functions (since the run-time-library [RTL] in PB/DOS is not reentrant).

                      I believe there is an example in the source code archive... try searching for "ISR".

                      ------------------
                      Lance
                      PowerBASIC Support
                      mailto:[email protected][email protected]</A>
                      Lance
                      mailto:[email protected]

                      Comment


                      • #12
                        Interesting,

                        I honestly didn't know that... I'll have to re-visit some older code that
                        I was working on.


                        ------------------
                        Scott Slater
                        Summit Computer Networks
                        www.summitcn.com
                        Scott Slater
                        Summit Computer Networks, Inc.
                        www.summitcn.com

                        Comment

                        Working...
                        X