A set of runnable 8086 ASM Programs, taken from the CPE 022 — Computer Architecture and Organization as Exercises and Activity (Deliverables).
This repository contains all of my activities and exercises taken from one of my courses (see the names on the sub title above). It was dumped to ensure that further review from this field and scope is reviewable without problems.
In short, I want to dump my deliverables somewhere open so that other fellow students who take up this course can find learning materials (not a cheating material!!!) for them to learn. If you ever get doubt at learning at this, then try looking at this repository where each .ASM has its comments (my insights).
The following list is a set of things you need to get up and running.
- An IDE or Text Editor (I'm using Visual Studio Code)
- DOSBox
- TASM
- TLINK
There's no indicator which version is better or optimal. Please follow the instructions of your professor.
Here's my snippet of what I have in my DOSBox Startup Configuration.
MOUNT <ANY_DRIVE_LETTER> <FOLDER>
<ANY_DRIVE_LETTER>:
TASM <PROGRAM_NAME_WO_EXTENSION>
TLINK /T <PROGRAM_NAME_WO_EXTENSION>
<PROGRAM_NAME_WO_EXTENSION>
- The first 2 is optional. The last 3 is required.
- It is pretty obvious that you should change the contents inside "<>" but without "<>" literally.
- Keep in mind that, this is my way of launching my ASM programs, because, I mainly debug them and once they are okay. I'm gonna close it and call it a day.
The following is a list of filenames along with it's description and their output. It will be long list, please check the media folder for the overview of those picture. Or click the images per row to see the exact output.
- The filenames are 8-letters long. Anything more than 8 will make the DOSBOX complain that it can't find it.(2) asd
- Most of the operations such as Adding and Subtracting a Number may require the use of
/T
when linking withTLINK.exe
. Please double check ifTLINK
is complaining about the stack being non-existent or otherwise. - With that being said, please try
/T
if the program won't run. The evaluation of needing/T
is purely based from assumption without running them and carefully evaluating it. - There are atleast 1-2 activities that didn't make it to the open-source. This is because those activities are: (a) too basic, (b) potentially renders someone unable to learn. and, (c) too complex to be provided and taken away. I have this one activity that has the capacity to drain my dignity for about 12 hours, I'll never forget that.
When there's a course that can't be taught professionally (in the means of teaching them with further knowledge about it), I would go initiate self-learning mode then proceed to ignore their teachings (they teach what's the basics and then proceed to have us learn the hard ropes because why not, it's a money grab anyway).
Whenever you clone this repository and take action on any part of this material, you are putting yourself in a responsibility where you can't blame and risk someone else (like me) for getting yourself caught cheating or otherwise.
I only provide materials in a fashion where I want to distribute them because I used other resources. If these materials are the exact thing that shows in your deliverables, please learn instead of copying them straight up from someone else.
With the fact of typical students stealing, please if possible, credit. There would be no issues whenever you do it or now either way; just give some appreciation at least.
The following links are a set of redirections to certain PDFs or articles that contain information on what you are doing. Keep in note that some of these links may also cover DEBUGX (which I didn't dump because I don't have them saved locally, they were done in runtime and didn't intend to save them.)
- Some TASM Instruction Set Info: http://www.husseinsspace.com/teaching/udw/1996/asmnotes/chaptwo.htm
- Service Interrupts Sys Calls: http://spike.scu.edu.au/~barry/interrupts.html
- Some Intro to Assembly: https://www.tutorialspoint.com/assembly_programming/assembly_tutorial.pdf
- Regarding About 4C00H Termination: https://www.quora.com/MOV-AX-4C00H-what-does-this-instruction-mean-in-a-microprocessor
- Flag Registers in 8085 and 8086: https://www.geeksforgeeks.org/flag-register-8085-microprocessor/ | https://www.geeksforgeeks.org/flag-register-8086-microprocessor/
- Arithmetic Flags and Instruction: https://service.scs.carleton.ca/sivarama/asm_book_web/Student_copies/ch6_arithmetic.pdf | http://www.ee.nmt.edu/~rison/ee308_spr02/supp/020123.pdf
- Assembly Registers: https://www.tutorialspoint.com/assembly_programming/assembly_registers.htm | https://www.csie.ntu.edu.tw/~acpang/course/asm_2004/slides/chapt_07_PartIISolve.pdf | https://www.tutorialspoint.com/assembly_programming/assembly_arithmetic_instructions.htm
- Registers and Executions: http://www.godevtool.com/GoasmHelp/newass.htm
- DEBUG Instructions: https://www.slideshare.net/defrimnc/debug-tutorial | https://montcs.bloomu.edu/Information/LowLevel/DOS-Debug.html
- ASM 8086 Cheatsheet: https://cheatography.com/mika56/cheat-sheets/asm-8086/
- About Brackets as Dereference of Address: https://stackoverflow.com/questions/2030366/what-do-the-brackets-mean-in-x86-asm | https://stackoverflow.com/questions/39474332/assembly-difference-between-var-and-var | Exactly: https://stackoverflow.com/a/39474679/5353223
- About DUP for Custom Declaration of Bytes of Space, Page 15: https://www2.southeastern.edu/Academics/Faculty/kyang/2009/Fall/CMPS293&290/ClassNotes/CMPS293&290ClassNotesChap03.pdf
- Understanding the use of "MOV AX, 0B800H": https://www.tek-tips.com/viewthread.cfm?qid=614518
- Understanding the use of "ORG 100H": https://stackoverflow.com/questions/13321808/how-does-assembler-process-org-100h-directive
- What is @data in ASM (cont.): https://stackoverflow.com/questions/4928538/what-does-the-data-directive-mean-in-masm | Proof: https://stackoverflow.com/questions/5330306/when-will-the-code-under-data-segment-execute-in-this-code | Work: https://stackoverflow.com/a/47002757/5353223
- Entering String Snippet: https://stackoverflow.com/a/29517960/5353223
- Looping Introduction: https://stackoverflow.com/a/10358699/5353223
- Supported Interrupts by Emulators in 8086 Architecture: https://www.gabrielececchetti.it/Teaching/CalcolatoriElettronici/Docs/i8086_and_DOS_interrupts.pdf
I would like to thank all of the authors that has a question that exists in the internet, people who provides pdfs and articles without shutting their servers down, extensions who extend the capabilities of my text editor, providers of TASM, DEBUGX and TLINK compiled programs, and other people who became the part of my self-learning experience of this course. Some links provided below are the once I can honorly mention because of my utilization to their programs / extensions / etc:
Thank you for reaching this far. I appreciate you for taking an interest to my dumped contents.