mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-11-04 01:56:53 +00:00 
			
		
		
		
	Updated Hardware: Hologram Projector (markdown)
							parent
							
								
									c90ef0c000
								
							
						
					
					
						commit
						09033df76c
					
				@ -23,13 +23,17 @@ Note that the Hologram Projector will clear itself at the end of the tick, it is
 | 
				
			|||||||
HWID_HOLO         EQU 0x9           ;; setup constants
 | 
					HWID_HOLO         EQU 0x9           ;; setup constants
 | 
				
			||||||
HOLO_DISPLAY_HEX  EQU 1
 | 
					HOLO_DISPLAY_HEX  EQU 1
 | 
				
			||||||
.data
 | 
					.data
 | 
				
			||||||
    DISPLAYED_HEX EQU 0X000A        ;; create a word in memory called DISPLAYED_HEX
 | 
					    DISPLAYED_HEX EQU 0X000A        ;; create a word in memory called
 | 
				
			||||||
                                    ;; and set its value to 0x000A
 | 
					                                    ;; DISPLAYED_HEX and set its value
 | 
				
			||||||
 | 
					                                    ;; to 0x000A
 | 
				
			||||||
.text
 | 
					.text
 | 
				
			||||||
    MOV A, HOLO_DISPLAY_HEX               ;; MOV the constant HOLO_DISPLAY_HEX into register A
 | 
					    MOV A, HOLO_DISPLAY_HEX         ;; MOV the constant HOLO_DISPLAY_HEX
 | 
				
			||||||
    MOV B, [DISPLAYED_HEX]                ;; MOV the value inside the memory spot DISPLAYED_HEX into register B
 | 
					                                    ;; into register A
 | 
				
			||||||
    HWI HWID_HOLO                         ;; create an hardware interrupt which will do the magic of displaying
 | 
					    MOV B, [DISPLAYED_HEX]          ;; MOV the value inside the memory
 | 
				
			||||||
    BRK                                   ;; halt execution for the rest of this tick
 | 
					                                    ;; spot DISPLAYED_HEX into register B
 | 
				
			||||||
 | 
					    HWI HWID_HOLO                   ;; create an hardware interrupt which
 | 
				
			||||||
 | 
					                                    ;; will do the magic of displaying
 | 
				
			||||||
 | 
					    BRK                             ;; halt execution for the rest of this tick
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
```assembly
 | 
					```assembly
 | 
				
			||||||
; Displaying the string "hello!"
 | 
					; Displaying the string "hello!"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user