Skip to content

Program to check if a number is a prime implemented in assembly (LC3).

Notifications You must be signed in to change notification settings

syedhabibcs/IsPrime-Assembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Academic Project (Computer Systems) Mar 2016

Program to check if a number is a prime implemented in assembly (LC3). To check if a number is prime multiple basic mathematic operations are required such as multiplication, integer division, and square root. Unfortunately, assembly doesn't provide these operations, so the program implements these operations as functions and uses them accordingly to compute if a number is prime.

Executing isPrime

  • Download LC3 assembler and simulator here
  • Assemble isPrime.asm using assembler
  • Simulate the object file

Files

The repository also contains intermediate and binary files:

  • isPrime.sym: file containing symbol table with each row containing label and it's address
  • isPrime.bin: this is the assembled code in binary
  • isPrime.hex: this is the assembled code in hex
  • isPrime.lst: this is the listing file containing human-readable assembled code

About

Program to check if a number is a prime implemented in assembly (LC3).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published