This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start: | |
ldi R16, 0 | |
out DDRD, R16 // internal pull-up | |
com R16 | |
out DDRC, R16 // หลักสิบ seg | |
out DDRB, R16 // หลักหน่วย seg | |
in R17, PIND // load data from sensor to R17 | |
// R20 หลักสิบ | |
// R21 หลักหน่วย | |
ldi R20, 0 // หลักสิบ = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.macro lock | |
push RA | |
push RB | |
push RC | |
push RD | |
push RE | |
push RF | |
push RI | |
push RT | |
.endmacro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
int demo1(){ | |
int i; | |
printf("#######################\n"); | |
printf("# Insert Employees #\n"); | |
printf("#######################\n"); | |
char genders[3][400] = {}; | |
char age[3][400] = {}; |