















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
It contains all practicals of CSA for sem 1 du.
Typology: Assignments
1 / 23
This page cannot be seen from the preview
Don't miss anything!
















On special offer
;this program adds two numbers start: read ;read->ac STA a ;store the new a read ;read b->ac STA b ;store the new a LDA a ;load a to ac OR b ;using nor gate write ;write hlt a: .data 2 0
b: .data 2 0 OUTPUT:
start: read ;read->ac STA a ;store the new a LDA a ;load a to ac NOT a ;using nor gate write ;write hlt
;this program add two number start: read ;read->ac STA a ;store a in ac
read ;readb->ac STA b LDA a ;load a to ac NOR b ; using xor gate write ;write hlt a: .data 2 0 b: .data 2 0
b: .data 2 0
;this program adds two numbers start: read ;read->ac ADD a ;add a to ac
STA a ;store the new a read ;read b->ac STA b ;store the new a ADD b ;add b to ac write ;write hlt a: .data 2 0 b: .data 2 0 OUTPUT:
;this program load band store number start: read ;read->ac STA a ;store a in ac LDA a ;load a to ac write ;write hlt a: .data 2 0
;this program increment and skip number start: read ;read->ac STA a ;store a in ac LDA a ;load a to ac inc ;increment ac ISZ a ;increment and skip if dr register is 0 inc ;increment ac if isz doesn't execute write ;write hlt a: .data 2 0 b: .data 2 0 OUTPUT: Enter an integer -
Output 0
;this program clear and complement ac start: read ;read->ac STA a ;store from ac LDA a ;load a to ac cla ;clear ac to 0 write ;write cma ;complement ac write
;this program increment ac ;this program skip if ac is positive ;this program skip if ac is negative ;this program skip if e is 0 Start: read
STA a ;store a to ac LDA a ;load a to ac inc ;increment ac write ;output spa ;check if ac is positive then skip inc ;increment if ac is not positive sna ;check if ac is negative then skip inc ;increment if ac is not negative write ;output hlt a: .data 2 0
THANK YOU!