Skip to content

Instantly share code, notes, and snippets.

@JoshTGreenwood
JoshTGreenwood / gist:27e81638428225e2bc0f
Created June 20, 2014 17:42
Assembly Code to search for a value in memory
/*
* midterm.asm
*
* Created: 6/20/2014 11:41:46 AM
* Author: Josh
*/
.org 0x0
ldi r29,0x00
ldi r30,0x10
@JoshTGreenwood
JoshTGreenwood / gist:cab6f61e6160579ea10f
Created June 20, 2014 16:10
Assembly Code To Read In From Ports
/*
* midterm.asm
*
* Created: 6/20/2014 11:41:46 AM
* Author: Josh
*/
.org 0x0
ldi r30,0x00
ldi r31,0x10
.dseg
.org 0x2000
output: .byte 1 ; insert comment
.cseg
.org 0x0
jmp main ; partial vector table at address 0x0
.org 0x200 ; main entry point at address 0x200 (step though the code)
main: ldi ZL,low(2*table) ; insert comment
ldi ZH,high(2*table) ; insert comment
ldi r16,celsius ; insert comment