Changeset 104071 in vbox for trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU8.asm
- Timestamp:
- Mar 26, 2024 8:20:34 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU8.asm
r98103 r104071 42 42 43 43 ;; 44 ; @cproto BS3_DECL(uint8_t) Bs3TestQueryCfgU8(uint16_t uCfg );45 ; @cproto BS3_DECL(bool) Bs3TestQueryCfgBool(uint16_t uCfg );44 ; @cproto BS3_DECL(uint8_t) Bs3TestQueryCfgU8(uint16_t uCfg, uint8_t bDefault); 45 ; @cproto BS3_DECL(bool) Bs3TestQueryCfgBool(uint16_t uCfg, bool fDefault); 46 46 ; 47 47 BS3_GLOBAL_NAME_EX BS3_CMN_NM(Bs3TestQueryCfgBool), function, 3 48 48 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU8, BS3_PBC_HYBRID 49 BS3_CALL_CONV_PROLOG 149 BS3_CALL_CONV_PROLOG 2 50 50 push xBP 51 51 mov xBP, xSP 52 52 push xDX 53 push xCX 53 54 54 xor al, al55 55 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 56 56 je .no_vmmdev … … 73 73 ; Read back the result. 74 74 in al, dx 75 %if TMPL_BITS == 16 76 mov cl, al 77 in ax, dx ; check the 'okay' 78 cmp ax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL & 0xffff 79 mov al, cl 80 mov ah, 0 81 %else 82 movzx ecx, al 83 in eax, dx ; check the 'okay' 84 cmp eax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL 85 mov eax, ecx 86 %endif 87 jne .no_vmmdev 88 89 .return: 90 pop xCX 91 pop xDX 92 pop xBP 93 BS3_CALL_CONV_EPILOG 2 94 BS3_HYBRID_RET 75 95 76 96 .no_vmmdev: 77 pop xDX 78 pop xBP 79 BS3_CALL_CONV_EPILOG 1 80 BS3_HYBRID_RET 97 %if TMPL_BITS == 16 98 mov al, [xBP + xCB + cbCurRetAddr + xCB] 99 %else 100 movzx eax, byte [xBP + xCB + cbCurRetAddr + xCB] 101 %endif 102 jmp .return 81 103 BS3_PROC_END_CMN Bs3TestQueryCfgU8 82 104
Note:
See TracChangeset
for help on using the changeset viewer.