in //BCD TO HEX BY AAMIR JAMIL
sto 01
brz 04 // if 0
br 07
lda 01 // load 0 input
out
hlt
lda 80
sub 01
brz 11 //if 1
br 14
lda 87 //load 1
out
hlt
lda 81
sub 01
brz 18 // if 2
br 21
lda 88 //load 2
out
hlt
lda 82
sub 01
brz 25 // if 3
br 28
lda 89 // load 3
out
hlt
lda 83
sub 01
brz 32 //if 4
br 35
lda 90 //load 4
out
hlt
lda 84 //load 5
sub 01
brz 39 //if 5
br 42
lda 91 //load 5
out
hlt
lda 85 //load 6 = 110
sub 01
brz 46 //if 6
br 49
lda 92 // load 6
out
hlt
lda 86 // load 7 = 111
sub 01
brz 53 // if 7
br 57
lda 93 // load 7
out
hlt
hlt
*80
dat 001 //80 1
dat 010 //81 2
dat 011 //82 3
dat 100 //83 4
dat 101 //84 5
dat 110 //85 6
dat 111 //86 7
dat 001 //87
dat 002 //88
dat 003 //89
dat 004 //90
dat 005 //91
dat 006 //92
dat 007 //93
Great blog, this piece of work has been bugging me for days, thank you for your help! Please keep up the good work, will recommend your blog to anyone who needs help in the future!
ReplyDelete:) Welcome
Delete