Examples
This commit is contained in:
		
							
								
								
									
										7
									
								
								examples/add1.asm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								examples/add1.asm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | ; This program adds 1 to register A until it equals 64, then halts. | ||||||
|  | ldb 1 | ||||||
|  | loop: | ||||||
|  | add b | ||||||
|  | cmp 64 | ||||||
|  | jnz loop | ||||||
|  | hlt | ||||||
							
								
								
									
										5
									
								
								examples/double.asm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								examples/double.asm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | ; Endlessly doubles A by adding itself to itself. | ||||||
|  | lda 1 | ||||||
|  | add b | ||||||
|  | ldb a | ||||||
|  | jpr loop | ||||||
		Reference in New Issue
	
	Block a user