Skip to content

Instantly share code, notes, and snippets.

View xkamail's full-sized avatar
🏠
Working from home

Pakorn Sangpeth xkamail

🏠
Working from home
View GitHub Profile
@xkamail
xkamail / main.asm
Created February 24, 2023 23:07
binary 0-99 to two 7-segment
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
@xkamail
xkamail / main.asm
Last active February 24, 2023 12:54
Multiply 16x16 (Signed) array 8bit and then sum all to 3 bytes
.macro lock
push RA
push RB
push RC
push RD
push RE
push RF
push RI
push RT
.endmacro
#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] = {};