;** ;** 97.461 LAB 1 Part B. ;** ;** A simple test program that enters an infinite loop. ;** ;** NOTE: This is an explanation of the assembler directives shown in ;** in the program. You are not required to become completely ;** familiar with the assembler. It is just a tool to help you learn about ;** the SDK-86. Read the following to get a idea of the basics. ;** Use the two programs shown in this lab as examples of templates for ;** your 8086 code. ;** ;** The statements PROG SEGMENT and PROG ENDS define a segment containing ;** program, data, or both, to be placed somewhere in virtual memory. ;** An entire assembler program may have many segments. The name PROG is ;** arbitrary. PROG is gets set to an immediate value that points to the ;** beginning of the segment. It can be used in statements such as ;** MOV AX,PROG ;** MOV DS,AX ;** to set register DS to the segment part of a physical address for ;** addressing data within the segment. ;** ;** The ORG 00100H tells the assembler/linker/loader that the statements ;** after the ORG will start at the physical address 00100H. ;** ;** ASSUME CS:PROG,DS:PROG causes two things to occur. First, the ;** linker/loader will automatically set the CS register to the ;** value of PROG after the program is loaded. Note that DS does NOT ;** get set automatically. (DS gets set by the first two statements of ;** the program). The second thing the ASSUME CS:PROG,DS:PROG does is ;** tell the assembler the segment to which variables have their default ;** offset. ;** ;** The last statement END START tells the loader what to put in the IP ;** register before the program is run, i.e. the first statement of the ;** program to be executed. ;** PROG SEGMENT ORG 00100H ASSUME CS:PROG,DS:PROG START: MOV AX,CS MOV DS,AX LOOP: MOV BX,150H MOV AX,[BX] ADD AX,[BX+2] MOV [BX+4],AX MOV BX,160H MOV [BX],AX JMP LOOP ORG 00150H DW 0003H DW 0009H PROG ENDS END START