====== UEFI DEBUG METHOD ====== ===== OUTPUT 80H 81H DEBUG CODE ===== 輸出常數確認程式是否有執行 //DonRtest S+ for(int i=0;i<800;i++) { for(int j=0;j<100;j++) { IoWrite8(0x81,0xAA); IoWrite8(0x80,0x55); } } //DonRtest E+ 輸出8位元變數 //DonRtest S+ UINT8 RegRead; //DonRtest RegRead=MmioRead8(0xFE001020); for(int i=0;i<800;i++) { for(int j=0;j<100;j++) { IoWrite8(0x81,0x33); IoWrite8(0x80,RegRead); } } //DonRtest E+ 輸出32位元變數 //DonRtest S+ UINT32 RegisterValue; UINT8 bytes[4]; bytes[0] = (UINT8)(RegisterValue & 0xFF); // LOW Byte (LSB) bytes[1] = (UINT8)((RegisterValue >> 8) & 0xFF); bytes[2] = (UINT8)((RegisterValue >> 16) & 0xFF); bytes[3] = (UINT8)((RegisterValue >> 24) & 0xFF); // High Byte (MSB) for(int y=0;y<4;y++) { for(int i=0;i<800;i++) { for(int j=0;j<100;j++) { IoWrite8(0x81,0xAA); IoWrite8(0x80,bytes[y]); } } } //DonRtest E+