home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / emulate / turbo208.lzh / cpuclk.asm < prev    next >
Assembly Source File  |  1991-06-16  |  2KB  |  66 lines

  1.  
  2.         NAME    CPUCLK
  3.         TITLE   CPUCLK -- Switch clock speed of 8088/V20 on A2088 bridgeboard.
  4.         PAGE    58,132
  5. ;..............................................................................
  6. ;
  7. ;       CPUCLK sets the clock speed of the 8088/V20 on the A2088 bridgeboard
  8. ;       by writing to the (write only) configuration register (port 63h) of
  9. ;       the Faraday FE2010A chip. This program will only work with a FE2010A!
  10. ;       The register is defined as follows:
  11. ;
  12. ;       Bit  Use
  13. ;        0    Disable parity
  14. ;        1    8087 Present (Enable 8087 NMI)
  15. ;        2    1 bank of 256K RAM's
  16. ;        3    lock register
  17. ;        4    ---
  18. ;        5    Semi-Fast
  19. ;        6    7.15MHz clock
  20. ;        7    9.54MHz clock
  21. ;
  22. ;
  23. ;       Written by Eddy Olk, 1991. This source is public domain and may be
  24. ;       freely distributed and used for non-commercial purposes.
  25. ;..............................................................................
  26.  
  27. cseg    SEGMENT
  28.         ASSUME  cs:cseg
  29.  
  30.         ORG     100h
  31.  
  32. start:  mov     al,ds:[0080h]    ;get length of command line
  33.         or      al,al
  34.         jz      usage            ;no argument given
  35.         mov     ah,ds:[0082h]    ;get 1st char of command line
  36.         mov     al,03h
  37.         cmp     ah,'0'
  38.         jz      setclk
  39.         mov     al,63h
  40.         cmp     ah,'1'
  41.         jz      setclk
  42.         mov     al,83h
  43.         cmp     ah,'2'
  44.         jz      setclk
  45.  
  46. usage:  mov     dx,offset message
  47.         mov     ah,9             ;good old CP/M print string
  48.         int     21h
  49.         int     20h              ;exit
  50.  
  51. setclk: out     63h,al
  52.         int     20h              ;exit
  53.  
  54. message:
  55.         db      "CPUCLK: set cpu clock speed of A2088."
  56.         db      0dh,0ah
  57.         db      "Usage: CPUCLK <0|1|2>"
  58.         db      0dh,0ah,0ah
  59.         db      "0 = 4.77 MHz, 1 = 7.15 MHz, 2 = 9.54 MHz"
  60.         db      0dh,0ah,'$'
  61.  
  62. cseg    ENDS
  63.  
  64.         END     start
  65.  
  66.