Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

52 rindas
1.4 KiB

pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
  1. int data_from_disk(index, number_sectors, data_buffer, data_buffer_segment);
  2. int disk_service_read_data_from_disk(index, number_sectors, data_buffer, data_buffer_segment);
  3. int disk_service_read_data_from_disk(index, number_sectors, data_buffer, data_buffer_segment)
  4. long* index;
  5. long number_sectors;
  6. void* data_buffer;
  7. int data_buffer_segment;
  8. {
  9. #asm
  10. #define index 4[bp]; // Note that this is a 32-bit argument.
  11. #define number_sectors 8[bp];
  12. #define data_buffer 10[bp];
  13. #define data_buffer_segment 12[bp];
  14. push bp
  15. mov bp,sp
  16. pusha
  17. lsfs_load_data:
  18. mov ax, index
  19. mov WORD [DAPACK.lba_addr_dw_low], ax
  20. mov bx, number_sectors
  21. mov WORD [DAPACK.blkcnt], bx
  22. mov cx, data_buffer_segment
  23. mov WORD [DAPACK.db_addr_segment], cx
  24. mov dx, data_buffer;
  25. mov WORD [DAPACK.db_addr_offset], dx
  26. mov si, #DAPACK ; address of
  27. mov ah, #0x42 ; READ
  28. mov dl, [global_disk_identifier]
  29. int #0x13
  30. ;call 0x0000:0x7C2A
  31. popa
  32. pop bp
  33. ret
  34. DAPACK:
  35. DAPACK.dap_Size: db 0x10
  36. DAPACK.rev_byte: db 0x0
  37. DAPACK.blkcnt: dw 0x0
  38. DAPACK.db_addr_offset: dw 0x0
  39. DAPACK.db_addr_segment: dw 0x0
  40. DAPACK.lba_addr_dw_low: dd 0x0
  41. DAPACK.lba_addr_dw_high: dd 0x0
  42. global_disk_identifier: db 0x80
  43. #endasm
  44. }