Assembler


- 3


0003 NEW_DISK ENDS
 
0000 ABS0 SEGMENT AT 0
004C ORG 13H*4
004C DISK_VECTOR LABEL WORD
0410 ORG 410H
0410 EQUIPMENT LABEL WORD
0413 ORG 413H
0413 MEMORY_SIZE LABEL WORD
 
= 00A0 DISK_SIZE EQU 160
7C00 ORG 7C00H ; ,
7C00 BOOT_RECORD LABEL FAR
7C00 ABS0 ENDS
 
0000 CODE SEGMENT
ASSUME CS:CODE,DS:ABS0
7C00 ORG 7C00H
7C00 8C C8 MOV AX,CS
7C02 8E D8 MOV DS,AX
7C04 8E C0 MOV ES,AX
7C06 8D 36 7C00 R LEA SI,BOOT_RECORD
7C0A 8D 3E 7A00 R LEA DI,BOOT_RECORD-200H ; ,
7C0E B9 0200 MOV CX,512 ;
7C11 F3/ A4 REP MOVSB ;
7C13 E9 7A16 R JMP NEXT_LOCATION-200H
7C16 NEXT_LOCATION:
 
. 10.2 - ()
7C16 83 06 0410 R 40 ADD EQUIPMENT,40H ;
7C1B A1 0413 R MOV AX,MEMORY_SIZE
7C1E 2D 00A0 SUB AX,DISK_SIZE
7C21 A3 0413 R MOV MEMORY_SIZE,AX ; ,-