<commit_before># Programming Assignment 2
# <NAME>

.data
str1: .asciiz "Enter integer a\n"
str2: .asciiz "Enter integer b\n "
str3: .asciiz "The least common multiple of a and b is "

.text
main:
li $v0, 4		# syscall 4 (printf)
la $a0, str1		# argument: string
syscall			# print the string (a)

li $v0, 5		# syscall 5 (read int, scanf)
syscall			# get input
move $t1, $v0		# place the value read into register $t1 (a=input, n1)

li $v0, 4		# syscall 4 (printf)
la $a0, str2		# argument: string
syscall			# print the string (b)

li $v0, 5		# syscall 5 (read int, scanf)
syscall			# get input
move $t2, $v0		# place the value read into register $t2 (b=input, n2)

jal lmc			# call procedure


li $v0, 4		# syscall 4 (printf)
la $a0, str3		# argument: string
syscall			# print the string (lcm(n1, n2))

li $v0, 10		# syscall 10 (terminate program, exit)
syscall

gcd:			# GCD procedure
jr $ra			# return from procedure

lcm:			# LCM procedure
jr $ra			# return from procedure<commit_msg>Update lcm.s<commit_after># Programming Assignment 2
# <NAME>

.data
str1: .asciiz "Enter integer a\n"
str2: .asciiz "Enter integer b\n"
str3: .asciiz "The least common multiple of a and b is "
nline: .asciiz "\n"

.text
main:
li $v0, 4		# syscall 4 (printf)
la $a0, str1		# argument: string
syscall			# print the string (a)

li $v0, 5		# syscall 5 (read int, scanf)
syscall			# get input
move $t0, $v0		# place the value read into register $t1 (a=input, n1)

li $v0, 4		# syscall 4 (printf)
la $a0, str2		# argument: string
syscall			# print the string (b)

li $v0, 5		# syscall 5 (read int, scanf)
syscall			# get input
move $t1, $v0		# place the value read into register $t2 (b=input, n2)

add $a0, $t0, $zero	# place n1 and n2 into args
add $a1, $t1, $zero
jal lcm			# call lcm
move $t2, $v0		# save result ($t2)

li $v0, 4		# syscall 4 (printf)
la $a0, str3		# argument: string
syscall			# print the string (lcm of ...)

li $v0, 1		# syscall 1 (print int)
add $a0, $t2, $zero	# move int to $a0
syscall			# print int (result of lcm call)

li $v0, 4		# syscall 4 (printf)
la $a0, nline		# argument: string
syscall			# print the string (new line)

li $v0, 10		# syscall 10 (terminate program, exit)
syscall

# Procedures
lcm:			# args number1, number2		
mult $a0, $a1		# number1 * number2
mfhi $t3		# put hi in t3
mflo $t4		# put lo in t4
add $v0, $t3, $t4	# put return variable in $v0
#jal gcd	
jr $ra			# return from procedure


gcd:			# GCD procedure
jr $ra			# return from procedure
{'fraction_non_alphanumeric': 0.11726647796198948, 'fraction_numerical': 0.044884755357864944, 'mean_word_length': 3.2655172413793103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3705532', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1029, 'n_words': 398}