Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. My first ASM

My first ASM

Scheduled Pinned Locked Moved The Lounge
comlinuxtoolsquestion
46 Posts 26 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

    I grew up on 6502 - instead of cereals and milk... :-D

    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

    G Offline
    G Offline
    Graham Coulby
    wrote on last edited by
    #30

    My first bit of tech was an NES, which did sport a version of the 6502, but there was absolutely no requirement to know what was going on inside. I only went down the path of learning 8-bit computers and assembly so I could get a better grasp at programming fundamentals. Making the emulator has been massively fun and definitely addressed the fundamentals.

    1 Reply Last reply
    0
    • R raddevus

      I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #31

      Strangely, x86/x64 is one of the few processors that I've used that I *haven't* written assembly for... Z80, 68000, VAX, ARM, various other embedded platforms, but never for any PC processors...

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      R 1 Reply Last reply
      0
      • R raddevus

        Private Dobbs wrote:

        Thinking back and comparing to the likes of modern assemblers or VS I have no idea how I managed it!

        Maybe you read Dr. Dobbs Journal? :) I just couldn't help notice that you are Private Dobbs. You wouldn't happen to be a doctor in your spare time, would you? :laugh: There was so little documentation back then. It's amazing that devs were able to do the things they did. Very cool story.

        P Offline
        P Offline
        Private Dobbs
        wrote on last edited by
        #32

        Alas not a doctor although at 18 I wanted to be one. However I am currently working on a medical app if that counts :)

        1 Reply Last reply
        0
        • R raddevus

          Mike Winiberg wrote:

          My first major contract was porting MSDOS 1.25 to an IBM PC Clone

          Wow! I wouldn't have even known where to start. How did you discover the details back then? Very difficult, very few books if any on stuff. Maybe the old Peter Norton book. Really interesting.:thumbsup:

          M Offline
          M Offline
          Mike Winiberg
          wrote on last edited by
          #33

          You were given the sources for the relevant device drivers by Microsoft, but - as I said - the comments generally didn't give much away, so it was a lot of assembling and hardware debugging using logic analysers etc 8) Of course back in those days, MS et al published printed manuals for their software etc - you didn't have to rely on intermittent broadband connections to websites with out of date or incomplete, badly formatted docs on them!

          1 Reply Last reply
          0
          • S Stuart Dootson

            Strangely, x86/x64 is one of the few processors that I've used that I *haven't* written assembly for... Z80, 68000, VAX, ARM, various other embedded platforms, but never for any PC processors...

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            R Offline
            R Offline
            raddevus
            wrote on last edited by
            #34

            Stuart Dootson wrote:

            Strangely, x86/x64 is one of the few processors that I've used that I haven't written assembly for..

            That is interesting. I guess it makes sense too because x86/x64 are used in PCs and there are a whole host of other tools to use to develop on those platforms. Meanwhile those other ones you mention probably don't have as many dev tools. Interesting. :thumbsup:

            1 Reply Last reply
            0
            • R raddevus

              I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

              J Offline
              J Offline
              James Curran
              wrote on last edited by
              #35
              ld   hl, 3c00h
              

              l1: ld a, (hl)
              xor a, 0BFh
              ld (hl), a
              inx hx
              ld a, h
              cmp 40h
              jne l1
              ret

              My first assembler subroutine, in Z-80assembler, for the TRS-80. First written circa 1979 and reprinted from memory. Now the tricky part: 21 00 3C 76 EE BF 77 23 7C FE 40 20 F5 C9 That's my best guess to the machine codes for that. (It steps through the monochrome graphics screen, inverting the bit, changing black->white, white->black on the image.) UPDATE: I just googled it. The correct machine code would be:

              21 00 3C
              7E ; funny thing. I wrote 7E on the scrap paper I figured it out on, then wrote 76 here.
              EE BF
              77
              23
              7C
              FE 40
              20 F3 ; relative jump starts counting from the address of NEXT op code.
              C9

              Truth, James

              R 1 Reply Last reply
              0
              • R raddevus

                I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                M Offline
                M Offline
                Member_5893260
                wrote on last edited by
                #36

                Takes me back. In the '80s, if you wanted something fast, you did it in assembly language. MASM in those days. I wrote *a lot* of it. I knew this one company who wrote an entire accounting system in it, which was pretty impressive - very fast and utterly obsolete as soon as Windows 3.1 died. I love assembly language: there's a purity to it which you don't find anywhere else.

                R 1 Reply Last reply
                0
                • R raddevus

                  I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                  G Offline
                  G Offline
                  glennPattonWork3
                  wrote on last edited by
                  #37

                  I have done a small(ish) ammount of 80X86 assembly when I was at Uni to get a graphics system working always wanted to go down the rabbit hole could never find the time or the book, I have ordered it just need some time now. When you are unemployed and have the time I never have the money for these things. Need to save more (or buy stuff to keep occupied while you can!!)

                  1 Reply Last reply
                  0
                  • J James Curran
                    ld   hl, 3c00h
                    

                    l1: ld a, (hl)
                    xor a, 0BFh
                    ld (hl), a
                    inx hx
                    ld a, h
                    cmp 40h
                    jne l1
                    ret

                    My first assembler subroutine, in Z-80assembler, for the TRS-80. First written circa 1979 and reprinted from memory. Now the tricky part: 21 00 3C 76 EE BF 77 23 7C FE 40 20 F5 C9 That's my best guess to the machine codes for that. (It steps through the monochrome graphics screen, inverting the bit, changing black->white, white->black on the image.) UPDATE: I just googled it. The correct machine code would be:

                    21 00 3C
                    7E ; funny thing. I wrote 7E on the scrap paper I figured it out on, then wrote 76 here.
                    EE BF
                    77
                    23
                    7C
                    FE 40
                    20 F3 ; relative jump starts counting from the address of NEXT op code.
                    C9

                    Truth, James

                    R Offline
                    R Offline
                    raddevus
                    wrote on last edited by
                    #38

                    Very nice. Reminds me of Wozniak creating computers on paper when he was young before he could afford CPUs (History of Apple Inc. - Wikipedia[^]).

                    1 Reply Last reply
                    0
                    • M Member_5893260

                      Takes me back. In the '80s, if you wanted something fast, you did it in assembly language. MASM in those days. I wrote *a lot* of it. I knew this one company who wrote an entire accounting system in it, which was pretty impressive - very fast and utterly obsolete as soon as Windows 3.1 died. I love assembly language: there's a purity to it which you don't find anywhere else.

                      R Offline
                      R Offline
                      raddevus
                      wrote on last edited by
                      #39

                      Dan Sutton wrote:

                      utterly obsolete as soon as Windows 3.1 died.

                      Windows 3.1 never died. It just faded away. :rolleyes:

                      M 1 Reply Last reply
                      0
                      • R raddevus

                        I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                        U Offline
                        U Offline
                        User 1651255
                        wrote on last edited by
                        #40

                        I used to write graphics routines in the late 90s while at uni using TASM (Turbo Assembler). Good old INT13 on Intel x86. Inline ASM in Turbo Pascal was also handy. I implemented a Bresenham line algorithm from C and extracted ROM fonts for pretty graphics. I wrote a system that used INT1C to perform crude TDM multitasking in DOS. Not sure where i found that gem. I still have Peter Norton's book somewhere too. That low level disk access!

                        1 Reply Last reply
                        0
                        • R raddevus

                          I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                          M Offline
                          M Offline
                          Member_15069878
                          wrote on last edited by
                          #41

                          My first ASM was in 1970, for the Varian Associates 620i 16 bit computer. It had 4K of core memory, so space was at a premium. Learned it in a 16 week Field Engineers Training Course for a Farrington Electronics OCR Page Reader

                          1 Reply Last reply
                          0
                          • K Kirk 10389821

                            In the 1980's I was using a PDP-11/34a in High School. I LOVED MACRO-11 Assembly Language. Basically it was C without the {}, LOL... I was running RSTS/E time sharing (32K Words of memory to support almost 30 users). RK06 Drives. Paper Terminals (Decwriter 300s I Believe, and we had 3 CRTs. One with COLOR, DEC 240?) EDT for an editor (or TECO if you were on paper. Imagine EDLIN with Type-ahead! ex$$) Curious, Gates replied to me that they were running TOPS-10 for the O/S on the PDP-10. I am still amazed by everything I was able to learn/do while in High School. My 3 Favorites: 1) I learned how to read another users keyboard buffer ("You spelled that wrong!", LOL) 2) I learned how to HALT the computer, and force my non-priv user to be a super-user! Awesome! (JFPRIV? Bit)... thanks to Michael Mayfields Book on the internals of RSTS/E book I bought with my own cash! [http://www.dmv.net/dec/pdf/rsts80inta.pdf\](http://www.dmv.net/dec/pdf/rsts80inta.pdf) WOW... I remembered JFPRIV correctly after 32 YEARS! 3) I rewrote the startup routines so the 7-10 minute startup process was done in under a minute! [I cheated. 80% of the time was changing the terminals to 300 Baud, etc. I recompiled the operating system, and modified the assembly, so the terminal settings were right for 30/33 terminals, and then only fixed the remaining 3. Even that, I rewrote in ASSEMBLY vs. BASIC PLUS 2 (BP2)] 4) I figured out how to open a tape as a non-structured file and modify it. This allowed me to copy the boot instructions from a DISK (which I learned was literally a boot loader), and write it to the tape, with a device adjustment. Making the tape, in fact, bootable. [I think I did this just after I graduated, because we did NOT have a tape drive, but I landed a job programming on PDP-11/70s] Oh, those were the days...

                            R Offline
                            R Offline
                            raddevus
                            wrote on last edited by
                            #42

                            Great stuff, thanks for sharing. :thumbsup:

                            1 Reply Last reply
                            0
                            • R raddevus

                              I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                              F Offline
                              F Offline
                              fatman45
                              wrote on last edited by
                              #43

                              My first assembly program I wrote using Peter Norton's Assembly Language Book for the IBM PC[^]. Using the book, you write a disk sector editor utility. It was a great learning experience.

                              Da Bomb

                              R 1 Reply Last reply
                              0
                              • F fatman45

                                My first assembly program I wrote using Peter Norton's Assembly Language Book for the IBM PC[^]. Using the book, you write a disk sector editor utility. It was a great learning experience.

                                Da Bomb

                                R Offline
                                R Offline
                                raddevus
                                wrote on last edited by
                                #44

                                fatman45 wrote:

                                My first assembly program I wrote using Peter Norton's Assembly Language Book for the IBM PC[^].

                                I know of that book. It was an amazing book for its time. Unfortunately I had never seen that book way back when I could've used it. But I probably wouldn't have been able to understand it back then anyways. :) Back then I read the fantastic book by Jeff Duntemann and it helped me a lot. Assembly Language Step-By-Step: 9780471578147: Computer Science Books @ Amazon.com[^]

                                1 Reply Last reply
                                0
                                • R raddevus

                                  I stumbled upon this book in my APress account today and it is so nicely written that in 10 minutes I wrote my first Assembly language program and ran it. Beginning x64 Assembly Programming: From Novice to AVX Professional: Van Hoey, Jo: 9781484250754: Amazon.com: Books[^] Over the years I've looked at Assembly and tried it out a little, but it's never been easier to try than now. I have Debian running in a VirtualBox so I quickly: 1. installed nasm (Netwide assembler). 2. Installed GCC tools 3. installed make 4. created a makefile as led by the book 5. typed in the sample program 6. let the makefile build and link the program. 7. ran it. That's very cool. This author is obviously really good because he gets right to the point and explains things clearly. I am impressed and I always like to read a good book that is so well-written.

                                  M Offline
                                  M Offline
                                  Martin ISDN
                                  wrote on last edited by
                                  #45

                                  love assembly

                                  1 Reply Last reply
                                  0
                                  • R raddevus

                                    Dan Sutton wrote:

                                    utterly obsolete as soon as Windows 3.1 died.

                                    Windows 3.1 never died. It just faded away. :rolleyes:

                                    M Offline
                                    M Offline
                                    Martin ISDN
                                    wrote on last edited by
                                    #46

                                    unlike other windows os that stop working on newer hardware (there is probably some afforest time trigger) win3.1 still runs without problems on new machines. at least it was running the last time i checked, intel dual core. windows 95 started making trouble on pentium 2/3 agp slot machines. you could hardly run windows 2000 on anything newer than lga775 and now the time cycle is set to minimal. this years machines run only on this years version of win 10. give or take a year or two max.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups