home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 3 / FreeSoftwareCollection3pd199x-jp.img / oh_fm / inkyoku / vram.asm < prev   
Assembly Source File  |  1980-01-02  |  1KB  |  68 lines

  1. vram segment byte public use32 'vram'
  2.     assume cs:vram
  3.  
  4. ;*****************************************
  5. ;  VRAM byte/word/dword access
  6. ;*****************************************
  7.  
  8. ;void putVRAMb(int ofs, int byte, int seg ) 
  9.     public putVRAMb
  10. putVRAMb proc near
  11.     mov fs,[esp+12]
  12.     mov eax,[esp+8]
  13.     mov ecx,[esp+4]
  14.     mov fs:[ecx],al
  15.     ret
  16. putVRAMb endp
  17.  
  18. ;void putVRAMw( int ofs, int word, int seg ) 
  19.     public putVRAMw
  20. putVRAMw proc near
  21.     mov fs,[esp+12]
  22.     mov eax,[esp+8]
  23.     mov ecx,[esp+4]
  24.     mov fs:[ecx],ax
  25.     ret
  26. putVRAMw endp
  27.  
  28. ;void putVRAMd(int ofs, int dword, int seg)
  29.     public putVRAMd
  30. putVRAMd proc near
  31.     mov fs,[esp+12]
  32.     mov eax,[esp+8]
  33.     mov ecx,[esp+4]
  34.     mov fs:[ecx],eax
  35.     ret
  36. putVRAMd endp
  37.  
  38. ;int getVRAMb(int ofs, int seg ) 
  39.     public getVRAMb
  40. getVRAMb proc near
  41.     mov fs,[esp+8]
  42.      mov ecx,[esp+4]
  43.     movzx eax,byte ptr fs:[ecx]
  44.     ret
  45. getVRAMb endp
  46.  
  47. ;int getVRAMw(int ofs, int seg)
  48.     public getVRAMw
  49. getVRAMw proc near
  50.     mov fs,[esp+8]
  51.     mov ecx,[esp+4]
  52.     movzx eax,word ptr fs:[ecx]
  53.     ret
  54. getVRAMw endp
  55.  
  56. ;int getVRAMd(int ofs, int seg)
  57.     public getVRAMd
  58. getVRAMd proc near
  59.     mov fs,[esp+8]
  60.     mov ecx,[esp+4]
  61.     mov eax,fs:[ecx]
  62.     ret 
  63. getVRAMd endp
  64.  
  65. vram    ends
  66.     end
  67.  
  68.