-
DATA EQU 20H
N EQU 8
TEST:
MOV DPTR,#LIST
MOV R0,#DATS
MOV R2,#N
CPY:
CLR A
MOVC A,@A+DPTR
MOV @R0,A
INC R0
INC DPTR
DJNZ R2,COPY
LCALL BUBSORT
LIST:
DB 53H,87H,12H,
http://www.codebf.com/read/7196/107359
-
DATS EQU 20H
N EQU 5DH
QUEUE EQU 1FH
F DATA 3CH
R DATA 3DH
TST:
MOV DPTR,#LIST
MOV P2,#DATS
MOV R0,#0
MOV R2,#N
CPY:
CLR A
MOVC A,@A+DPTR
MOVX @R0,A
INC DPTR
http://www.codebf.com/read/7196/107360
-
DATA EQU 20H
N EQU 8
SSSRT:
MOV DPTR,#LIST
MOV R0,#DATS
MOV R2,#N
CPY:
CLR A
MOVC A,@A+DPTR
MOV @R0,A
INC R0
INC DPTR
DJNZ R2,CPY
LCALL SELSORT
LIST:
DB 53H,87H,12H
http://www.codebf.com/read/7196/107361
-
N DATA 30H
NFACT EQU 31H
TST:
MOV N,#5
LCALL FACT0
MOV N,#8
LCALL FACT0
MOV N,#10
LCALL FACT0
STOP:
LJMP STOP
FACT0:
MOV A,N
LCALL
http://www.codebf.com/read/7196/107362
-
COUNT: EQU 03H
TABLE: DEFB 01H,20H,50H,3AH,2BH,E5H
DSRT:
MOV R6,#00H
MOV R7,#COVNT
DEC R1
MOV R0,#TAB
MOV R1,#23H
LOOP:
MOV 2AH,@R0
INC R0
MOV 2BH,@R0
MOV 2CH,@R1
INC R
http://www.codebf.com/read/7196/107364
-
FDD2:
MOV R2,#0
MOV A,R7
DEC A
MOV R3,A
MOV R6,DPH
MOV R7,DPL
FD81:
CLR C
MOV A,R3
SUBB A,R2
JC FD89
RRC A
ADD A,R2
MOV R1,A
http://www.codebf.com/read/7196/107365
-
FINDS:
MOV B,A
MOV DPL,R1
MOV DPH,R0
FINDB1:
MOVX A,@DPTR
CJNE A,B,FINDB2
MOV R1,DPL
MOV R0,DPH
CLR A
RET
FIND2:
INC DPTR
DJNZ R7,FINDB1
MOV A,#0FFH
R
http://www.codebf.com/read/7196/107366
-
FDD1:
MOV B,A
MOV R2,#0
MOV A,R7
DEC A
MOV R3,A
FD61:
CLR C
MOV A,R3
SUBB A,R2
JC FD69
RRC A
ADD A,R2
MOV R4,A
MOVC A,@A+DP
http://www.codebf.com/read/7196/107367
-
TABLE: EQU 20H
COVNT: EQU 08H
MOV R0,#TABLE
MOV R7,#COVNT
MOV R4,COVNT
MOV R6,#02H
LOOP:
MOV R0,#TABLE
MOV R5,#COVNT
MOV 2CH,#COVNT
MOV 2CH,#COVNT
MOV A,#R0
ADD
http://www.codebf.com/read/7196/107368
-
SEARCHB:
MOV B,A
MOV A,R1
ADD A,R7
MOV R7,A
MOV A,R0
ADDC A,R6
MOV R6,A
MOV A,R7
SUBB A,#01H
MOV R7,A
JNC SECH1
DEC R6
SECH1:
MOV A,R7
CLR C
SUBB A,R1
http://www.codebf.com/read/7196/107369