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.
- Download LC3 assembler and simulator here
- Assemble isPrime.asm using assembler
- Simulate the object file
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