浏览代码

maybe timer is finally corerect initialized

Phil 4 年之前
父节点
当前提交
377e45ec5d
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      timer.asm

+ 7 - 6
timer.asm

@@ -14,7 +14,7 @@ section .bss
 	lt RESB 1
 	ot RESB 16
 	;timer struct interval
-	itimer RESQ 1
+	itimer RESQ 2
 	;timer struct init val
 	vtimer RESQ 1
 
@@ -42,17 +42,18 @@ _start:
 
 	;init timer
 	;interval		
-	mov [itimer], dword 0x0
+	mov [itimer], dword 0x05
 	mov [itimer + 4], dword 0x20
 	;value
-	mov [vtimer], dword 0x0
-	mov [vtimer + 4], dword 0x0
+	mov [itimer + 8], dword 0x0
+	mov [itimer + 12], dword 0x0
 
 	;settime sys_timerfd_settime
 	mov eax, SYS_TIMERFD_SETTIME
 	mov ebx, [tfd]
-	mov ecx, itimer 
-	mov edx, vtimer
+	mov ecx, 0
+	mov edx, itimer 
+	mov esi, 0
 	int 0x80
 
 	;mov eax, 3