Posts

Showing posts with the label Lab

Lab 4 (6502 Assembly Language String Lab): Option 1: Adding Calculator

Introduction In this posting, I will describe a design and implementation for option 1, lab 4: Adding Calculator. There is a previous posting to describe a code for option 4: Screen Colour Selector . Option 1: Adding Calculator Create a subroutine which enables the user to enter two numbers of up to two digits. Indicate where the cursor is, and allow the user to use the digit keys (0-9), backspace, and enter keys. Return the user's input value in the accumulator (A) register. Using this subroutine, write a program which adds the two numbers (each of which is in the range 0-99) and print the result. The detailed instruction for this lab is demonstrated here . 1. Design 1.1. Pseudo Code Store "Enter the first number", "Enter the second number", "result" to output on the screen Print the "Enter the first number: " Receive the first number from the user. User can use enter to store the number and backspace to erase a number Store...

Lab 5: 64-bit Assembler - x86_64

Image
Instruction This posting will describe the process and the finding of lab 5. This posting only covers x86_64. The explanation for Aarch64 is described in the previous posting:  Lab 5: 64-bit Assembler - Aarch64 .  You can see  the detailed instruction of the lab5  on the Seneca SPO600 website. The Brief Instruction of the Lab 5 about Aarch64 There are four representative part of the Lab 5 Take a look at the code using 'objdump -d objectfile' using aarch64 assembly language programs Take a look at the code using 'objdump -d objectfile' using x86_64 assembly language programs Write code to loop a message with digit using Aarch64 assembly language programs Write code to loop a message with digit using x86_64 assembly language programs This posting only covers the x86_64 part. 'Objdump -d hello' using Aarch64 language programs The <main> section in the output of 'objdump -d' command using x86_64 language programs is below. hello  ...

Lab 5: 64-bit Assembler - Aarch64

Image
Instruction This posting will describe the process and the finding of lab 5. This lab covers the comparison between Aarch64 and x86_64. The lab instructs to compare the result of the 'objdump -d' command in Aarch64 and x86_64. Also, it covers the writing code to make the same result using Aarch64 and x86_64. This posting only covers Aarch64 part because I got a login problem in x86_64. You can see  the detailed instruction of the lab5 on the Seneca SPO600 website. The Brief Instruction of the Lab 5 about Aarch64 There are four representative part of the Lab 5 Take a look at the code using 'objdump -d objectfile' using aarch64 assembly language programs Take a look at the code using 'objdump -d objectfile' using x86_64 assembly language programs Write code to loop a message with digit using Aarch64 assembly language programs Write code to loop a message with digit using x86_64 assembly language programs This posting only covers the Aarch64 part. ...