home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / AMISPD2.ZIP / AMIFAST.ASM next >
Encoding:
Assembly Source File  |  1990-08-25  |  1.5 KB  |  50 lines

  1. ; Program to set AMI MARK III motherboard to fast CPU speed, and 
  2. ; enable cache.
  3. ;  this is a .COM program, use EXE2BIN or equivalent after assembling 
  4. ;  and linking.
  5. ;
  6. code    segment public
  7. assume  cs:code,  ds:code
  8.         org     100h
  9. start:
  10. jmp     begin
  11. cr      equ     0dh
  12. lf      equ     0ah
  13. port    equ     460h    ; index port, data port is 461h
  14. index   equ     0bh     ; register in port
  15. msg_fast   db   cr,lf,lf,'CPU set to FAST, with cache enabled.',cr,lf,'$'
  16. ;
  17. begin:
  18.         mov     dx,port
  19.         mov     al,index
  20.         out     dx,al
  21.         jmp     $+2     ; delays
  22.         jmp     $+2
  23.         inc     dx      ; point to data port
  24.         in      al,dx   ; and read it, from register 0bh
  25.         or     al, 00000011b    ; set bits 0 and 1
  26. ;    change above line as follows--
  27. ;    and al,11111100b--set to slow and disable cache
  28. ;    and al,11111101b--disable cache in fast mode (always off in slow)
  29. ;    xor al,00000001b--toggle speed
  30. ;    xor al,00000010b--toggle cache
  31.         dec     dx      ; back to index port
  32.         xchg    al,ah   ; save al
  33.         mov     al,0bh
  34.         out     dx,al
  35.         jmp     $+2
  36.         jmp     $+2
  37.         inc     dx      ; and, back again to data
  38.         xchg    al,ah   ; put what we want back in al
  39.         out     dx,al   ; and write it where it belongs (we hope)
  40.         mov     dx,offset msg_fast      ;print message
  41.         mov     ah,09
  42.         int     21h
  43.         mov     ax,4c00h                ; and go away
  44.         int     21h
  45. ;
  46. code    ends
  47.         end     start
  48.  
  49.  
  50.