Intel 386 User Manual
Page 179

Intel386™ EX EMBEDDED MICROPROCESSOR USER’S MANUAL
7-20
SetEXRegWordInline(CS2ADL,0x08700);
// Enables SRAM as memory
SetEXRegWordInline(CS2ADH,0x3);
SetEXRegWordInline(CS2MSKL,0x07C01);
SetEXRegWordInline(CS2MSKH,0x00);
_asm
// Copy SMM_EXAM.BIN code into SRAM
{
mov ax,0x3800
// Starting address for SMM_EXAM file
mov es,ax
// to be placed
mov ax,seg SerialWriteStr2
// Address where SMM_EXAM is located
mov ds,ax
mov cx,0x100
// Length of SMM_EXAM file in bytes
mov si,offset SerialWriteStr2
mov di,0
rep movsb
}
SetEXRegWordInline(CS2MSKL,0x7801);
// Resets SRAM to enabled in SMM only
_asm
// Restore register values
{
pop DI
pop SI
pop DS
pop ES
}
// Loop endlessly and display another serial message
while(1)
// Serial Write Loop
{
SerialWriteStr(SIO_PORT,SMMString);
}
}
/**************************** END MAIN **********************************/