Posts

Showing posts from May, 2016

8086 STRING MANIPULATION – SORTING

ASSUME CS: CODE, DS: DATA DATA SEGMENT LIST DW 53H, 25H, 19H, 02H COUNT EQU 04H DATA ENDS CODE SEGMENT START:           MOV AX, DATA                         MOV DS, AX                         MOV DX, COUNT-1 LOOP2:          MOV CX, DX                         MOV SI, OFFSET LIST AGAIN:          MOV AX, [SI]                         CMP AX, [SI+2]    ...

8086 STRING MANIPULATION – COPY A STRING

ASSUME CS: CODE, DS: DATA DATA SEGMENT SOURCE EQU 2000H DEST EQU 3000H COUNT EQU 05H DATA ENDS CODE SEGMENT START:           MOV AX, DATA                         MOV DS, AX                         MOV ES, AX                         MOV SI, SOURCE                         MOV DI, DEST                         MOV CX, COUNT    ...

8086 STRING MANIPULATION –FIND AND REPLACE A WORD

ASSUME CS: CODE, DS: DATA DATA SEGMENT LIST DW 53H, 15H, 19H, 02H REPLACE EQU 30H COUNT EQU 05H DATA ENDS CODE SEGMENT START:           MOV AX, DATA                         MOV DS, AX                         MOV AX, 15H                         MOV SI, OFFSET LIST                         MOV CX, COUNT                         MOV AX, 00  ...

8086 STRING MANIPULATION – SEARCH A WORD

ASSUME CS: CODE, DS: DATA DATA SEGMENT LIST DW 53H, 15H, 19H, 02H DEST EQU 3000H COUNT EQU 05H DATA ENDS CODE SEGMENT START:           MOV AX, DATA                         MOV DS, AX                         MOV AX, 15H                         MOV SI, OFFSET LIST                         MOV DI, DEST                         MOV CX, COUNT  ...

BIOS/DOS CALLS – DISK INFORMATION

ASSUME CS: CODE, DS: DATA DATA SEGMENT MSG DB 0DH, 0AH, “GOOD MORNING” , ODH, OAH, “$” DATA ENDS CODE SEGMENT START:     MOV AX, DATA                   MOV DS, AX                   MOV AH, 36H                   MOV DX, OFFSET MSG                   INT 21H                   MOV AH, 4CH                   INT 21H CODE ENDS END START

BIOS/DOS CALLS – FILE MANIPULATION

ASSUME CS: CODE, DS: DATA DATA SEGMENT FILENAME DB “SAMPLE.DAT”, “$” MSG DB 0DH, 0AH, “FILE NOT CREATED”, ODH, OAH, “$” DATA ENDS CODE SEGMENT START:           MOV AX, DATA                         MOV DS, AX                         MOV DX, OFFSET FILENAME                         MOV CX, 00H                         MOV AH, 3CH                       ...

BIOS/DOS CALLS – DISPLAY

ASSUME CS: CODE, DS: DATA DATA SEGMENT MSG DB 0DH, 0AH, “GOOD MORNING” , ODH, OAH, “$” DATA ENDS CODE SEGMENT START:     MOV AX, DATA                   MOV DS, AX                   MOV AH, 09H                   MOV DX, OFFSET MSG                   INT 21H                   MOV AH, 4CH                   INT 21H CODE ENDS END START

2 X 2 MATRIX MULTIPLICATION

Image
ADDRESS OPCODE LABEL MNEMONICS OPERAND COMMENT 8100 MVI C, 00 Clear C reg. 8101 8102 LXI H, 8500 Initialize HL reg. to 4500 8103 8104 8105 LOOP2 LXI D, 8600 Load DE register pair 8106 8107 8108 CALL MUL Call subroutine MUL 8109 810A 810B MOV B,A Move A to B reg. 810C INX H Increment HL register pair . 810D ...