我对A20门有疑问.我读了一篇关于它的文章,说这个机制存在解决地址"环绕"的问题,当新的CPU获得32位地址总线而不是旧的20位总线时出现.
在我看来,处理环绕的正确方法是关闭所有位A20-A31,而不仅仅是A20.
为什么只关闭A20位才能解决问题呢?
我有一个简单的程序.它必须从硬盘驱动器(而不是mbr)读取第一个扇区,并将其写入0扇区(mbr).但它不起作用.我认为它与错误的DAP有关.谢谢.
[bits 16]
[org 0x7c00]
;clear screen
start:
mov ax, 0x3
int 0x10
;reset the hard drive
xor ah, ah
mov dl, 0x80
int 0x13
jnz error
;read the second sector
mov si, DAP
mov ah, 0x42
int 0x13
mov si, data
call print_string
jmp $
DAP:
db 0x10 ;size of DAP
db 0x0 ;zero
db 0x1 ;number of sectors to read
db 0x0 ;zero
;point to memory
dw 0x0 ;offset
dw 0x0 ;segment
dq 0x1 ;disk address
DAP2:
db …Run Code Online (Sandbox Code Playgroud) 在我的MIT OS课程(686)中,我发现了一些我不理解的代码。我想了解指令inb $0x64, %al的启动 / boot.S。我的理解是它正在从数据端口0x64读一个字节到AL,端口0x64是什么?正在测试哪个设备或机制忙?我对代码忙中的注释感到困惑吗?评论是什么意思,它指的是什么?
# Enable A20:
# For fascinating historical reasons (related to the fact that
# the earliest 8086-based PCs could only address 1MB of physical memory
# and subsequent 80286-based PCs wanted to retain maximum compatibility),
# physical address line 20 is tied to low when the machine boots.
# Obviously this a bit of a drag for us, especially when trying to …Run Code Online (Sandbox Code Playgroud) 英特尔MPX,在以下文档中描述了新手:https://software.intel.com/sites/default/files/managed/68/8b/319433-019.pdf
我不确定我理解BNDLDX和BNDSTX是如何工作的.以BNDSTX为例.
从文档(第855页):
"BNDSTX用于通过使用两级结构的地址转换将与缓冲区关联的边界和指向该缓冲区的指针的"指针值"存储到绑定表条目中,请参见第9.3.8节.例如,软件有一个存储在BND0中的边界的缓冲区,指向缓冲区的指针在ESI中,以下序列将"指针值"(缓冲区)和边界存储到已配置的绑定表条目中,使用与相关的线性地址的地址转换由基址寄存器和索引寄存器组成的SIB寻址形式的基础:"
MOV ECX, Dword ptr [ESI] ; store the pointer value in the index register ECX
MOV EAX, ESI ; store the pointer in the base register EAX
BNDSTX Dword ptr [EAX+ECX], BND0 ; perform address translation from the linear address of the base EAX and store bounds and pointer value ECX onto a bound table entry.
Run Code Online (Sandbox Code Playgroud)
该示例说明ESI包含一些指针,如果是这样,那么第一条指令mov ecx,dword ptr [esi]通过间接寻址执行一个简单的mov并获取任何esi 指向 ecx 的dword ,这就是我所假设的用"指针值"表示,或者它们是否代表其他东西?这是什么目的,这与BNDSTX执行的地址转换有何关系?
第二条指令似乎足够直观,它只是想将这个指针存储到缓冲区并复制它.然而,为什么这是严格需要也有点奇怪.BND0不包含缓冲区的开头吗?它不是简单地复制下限指针吗?而且,这个"指针值"的用途到底是什么目的还不清楚.
基于 Qt 4.8 的应用程序 - QDialog 问题,最小化按钮
Windows 和 Gnome (Linux)
但问题来了:
看来这是一个依赖于平台的功能 -
我不太确定该做什么。
有任何想法吗...?(我已经尝试了一些 windowsFlags,但找不到有效的一组。
尝试过:
--- 但基本问题是为什么 Windows/GNOME 上的行为与 KDE 不同
我创建了一个简单的 REST Spring 启动应用程序。我看到它开始,但它立即关闭。日志中没有错误。
下面是代码和日志。
代码:
@Controller
@ComponentScan
@EnableAutoConfiguration
@RequestMapping("userInfo")
public class UserUpdateService
{
private java.util.logging.Logger logger = Logger.getLogger("UserUpdateService");
@RequestMapping(value="/{userId}", method=RequestMethod.GET, produces = "application/xml; charset=utf-8")
@ResponseBody
String getUserInfo(@PathVariable String userId)
{
String func = "getUserInfo";
logger.entering("UserUpdateService", func);
String retval = "";
return retval;
}
@RequestMapping(value="/{userId}", method=RequestMethod.DELETE, produces = "application/xml; charset=utf-8")
@ResponseBody
String removeUser(@PathVariable String userId)
{
String retval = "";
String func = "removeUser";
logger.entering("UserUpdateService", func);
return retval;
}
@RequestMapping(value="/", method=RequestMethod.PUT, produces = "application/xml; charset=utf-8")
@ResponseBody
String addUser(@WebParam (name = …Run Code Online (Sandbox Code Playgroud) 我正在使用与Irvine库的x86程序集.
检查寄存器值是否等于零的最简单方法是什么?
我使用cmp指令,但我正在寻找替代方法.这是我使用cmp指令的代码,寄存器是ebx
cmp ebx,0
je equ1
mov ebx,0
jmp cont
equ1:
mov ebx,1
jmp cont
cont:
exit
Run Code Online (Sandbox Code Playgroud)
这个"booleanizes"一个值,int ebx = !!ebx在C中产生0或1 .
是否有一些工具可以将原始十六进制分解为汇编指令?例如:假设我们有\xeb\x1d根据这个在线反汇编程序反汇编成jmp 0x1f。那么有没有一些离线工具?我试过 ndasm 它没有给我正确的输出。
ndisam -b32 foo 给了我:
输出:
00000000 5C pop esp<br>
00000001 7833 js 0x36<br>
00000003 315C7865 xor [eax+edi*2+0x65],ebx<br>
00000007 620A bound ecx,[edx]
Run Code Online (Sandbox Code Playgroud)
它应该是 jmp 0x1f。我也试过 objdump 像:
objdump -D -b binary -mi386 -M intel foo
输出:
00000000 <.data>:<br>
0: 5c pop esp <br>
1: 78 33 js 0x36 <br>
3: 31 5c 78 65 xor DWORD PTR [eax+edi*2+0x65],ebx<br>
7: 62 0a bound ecx,QWORD PTR [edx]<br>
Run Code Online (Sandbox Code Playgroud)
所以你能告诉我一些将原始十六进制代码反汇编成汇编语言的工具吗?
我也尝试过 gdb,但我想要更灵活的东西。
我以前从未做过,而且大多数教程都没有提到如何处理.crt文件。
我从GoDaddy购买了SSL证书,并在下载时选择了Tomcat作为平台。压缩文件包含3个文件:
dea08asdjakjawl.crt
gd_bundle-g1-g1.crt
gdig.crt.pem
Run Code Online (Sandbox Code Playgroud)
我在CentOS7服务器上有一个正在运行的Spring Boot应用程序(在具有嵌入式Tomcat的端口80上)。(服务器在Digital Ocean上运行,它具有分配的域,并且可以使用简单的http)
我想将其切换到https://something.com
所有教程都建议我为此必须具有.jks或.p12文件,但无法将.crt文件转换为该文件。此外,我不确定2 .crt文件中的哪个应转换为.jks / .p12。
我已将此添加到我的application.yaml中,但没有帮助:
server:
port: 443
ssl:
enabled: true
key-alias: server
key-store: "cert.crt"
key-store-password: "***"
Run Code Online (Sandbox Code Playgroud)
如何使用此证书将正在运行的Spring Boot项目更改为接受HTTPS查询?
我正在为内核编写 GDT 并且一切顺利,我正在关注本教程。
http://www.osdever.net/bkerndev/Docs/gdt.htm
当将 C 代码链接到汇编代码时,他使用这段代码。
; This will set up our new segment registers. We need to do
; something special in order to set CS. We do what is called a
; far jump. A jump that includes a segment as well as an offset.
; This is declared in C as 'extern void gdt_flush();'
global _gdt_flush ; Allows the C code to link to this
extern _gp ; Says that '_gp' is in another file
_gdt_flush: …Run Code Online (Sandbox Code Playgroud)