.Model small code_seg segment 'code' assume cs:code_seg ORG 0000h ;store constant values DW 0200h ;new IP for main program DW 0FF80h ;new CS for main program ;CS + IP = FFA00h = 200h in ROM ORG 0200h init: MOV AX, 0F000h ;initialization MOV DS, AX ;set DS to F0000h to target peripherals main: ;main program - start inifinite loop comm: ;read input port register lamp: ;turn lamp on/off lght: ;read photoresistor and A/D circuit data fifo: ;write the data to the fifo JMP main ORG 07F0h cold: MOV AX, 0FF80h MOV DS, AX ;set DS to FF800h=000h in ROM MOV BX, 0000h JMP DWORD PTR [BX] END code_seg ends