pmemmanager.asm
上传用户:qddsws
上传日期:2022-06-22
资源大小:723k
文件大小:1k
源码类别:

操作系统开发

开发平台:

C/C++

  1. BITS 32
  2. AVAIL_RAM equ 0x18000
  3. UP16MM_STACK_BASE equ 0xffbffffe
  4. UP16MM_STACK_POINTER dd 0xffbffffe
  5. UP16MM_STACK_LIMIT dd 0xffb10000 ;;NO!
  6. UP16MM_STACK_COUNT dw 0x00
  7. [GLOBAL push_up16mm]
  8. push_up16mm: ;; A eax hi ha la double word que posem a la pila
  9. dec dword [UP16MM_STACK_POINTER]
  10. dec dword [UP16MM_STACK_POINTER]
  11. dec dword [UP16MM_STACK_POINTER]
  12. dec dword [UP16MM_STACK_POINTER]
  13. inc word [UP16MM_STACK_COUNT]
  14. mov ebx,[UP16MM_STACK_POINTER]
  15. mov [ebx],eax
  16. ret
  17. [GLOBAL pop_up16mm]
  18. pop_up16mm:
  19. mov ebx,[UP16MM_STACK_POINTER]
  20. mov eax,[ebx]
  21. inc dword [UP16MM_STACK_POINTER]
  22.                 inc dword [UP16MM_STACK_POINTER]
  23.                 inc dword [UP16MM_STACK_POINTER]
  24.                 inc dword [UP16MM_STACK_POINTER]
  25.                 dec word [UP16MM_STACK_COUNT]
  26. ret
  27. ;add eax,1024
  28. ;shl eax,12
  29. ;mov [eax],ebx
  30. ;mov eax,0xfafafafa
  31. ret
  32.