Changeset 8325447 in buchla-68k for ram/fpuint.s


Ignore:
Timestamp:
08/07/2017 02:04:35 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
27c8d40
Parents:
84c0125
Message:

Removed _ prefix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/fpuint.s

    r84c0125 r8325447  
    55                .text
    66
    7                 .xdef   _fpuint         | process an FPU interrupt
    8                 .xdef   _fpuclr         | reset the FPU
    9                 .xdef   _clrvce         | quiet a voice
    10 
    11                 .xdef   _fputrap        | a very good debug trap point
    12 
    13                 .xdef   _fp_resv        | 'spare' function reset value table
    14                 .xdef   _fpuifnc        | FPU interrupt code  (voice / function)
    15 
    16                 .xref   _irand          | ranged random number function
    17                 .xref   _scope          | diagnostic scope function
    18                 .xref   _xgetran        | random number function
    19 
    20                 .xref   _expbit
    21                 .xref   _funcndx
    22                 .xref   _initcfg
    23                 .xref   _ndisp
    24                 .xref   _pflist
    25                 .xref   _pfqhdr
    26                 .xref   _prstab
    27                 .xref   _ptoftab
    28                 .xref   _scopef
    29                 .xref   _timemlt
    30                 .xref   _trgtab
    31                 .xref   _valents
    32                 .xref   _vce2grp
    33                 .xref   _vce2trg
    34                 .xref   _veltab
     7                .xdef   fpuint          | process an FPU interrupt
     8                .xdef   fpuclr          | reset the FPU
     9                .xdef   clrvce          | quiet a voice
     10
     11                .xdef   fputrap         | a very good debug trap point
     12
     13                .xdef   fp_resv         | 'spare' function reset value table
     14                .xdef   fpuifnc         | FPU interrupt code  (voice / function)
     15
     16                .xref   irand           | ranged random number function
     17                .xref   scope           | diagnostic scope function
     18                .xref   xgetran         | random number function
     19
     20                .xref   expbit
     21                .xref   funcndx
     22                .xref   initcfg
     23                .xref   ndisp
     24                .xref   pflist
     25                .xref   pfqhdr
     26                .xref   prstab
     27                .xref   ptoftab
     28                .xref   scopef
     29                .xref   timemlt
     30                .xref   trgtab
     31                .xref   valents
     32                .xref   vce2grp
     33                .xref   vce2trg
     34                .xref   veltab
    3535
    3636                .page
     
    194194                .page
    195195| ------------------------------------------------------------------------------
    196 | _fpuint() -- process FPU interrupts
     196| fpuint() -- process FPU interrupts
    197197
    198198|       void
     
    204204| ------------------------------------------------------------------------------
    205205
    206 _fpuint:        movem.l d0-d5/a0-a3,-(a7)       | preserve registers we use
     206fpuint:         movem.l d0-d5/a0-a3,-(a7)       | preserve registers we use
    207207                move.w  FPUINT1,d0      | read FPU interrupt status
    208208                andi.w  #0x00FF,d0      | mask out garbage in MS bits
    209                 move.w  d0,_fpuifnc     | save for later use
    210                 move.w  _ndisp,d1       | get display number
     209                move.w  d0,fpuifnc      | save for later use
     210                move.w  ndisp,d1        | get display number
    211211                cmpi.w  #11,d1          | see if we display
    212212                bne     nodisp          | jump if not
    213213
    214                 tst.w   _scopef         | ...
     214                tst.w   scopef          | ...
    215215                beq     nodisp          | ...
    216216
    217217                move.w  d0,-(a7)        | display value
    218                 jsr     _scope          | ...
     218                jsr     scope           | ...
    219219                tst.w   (a7)+           | ...
    220220
    221                 move.w  _fpuifnc,d0     | get FPU status
     221                move.w  fpuifnc,d0      | get FPU status
    222222
    223223nodisp:         move.w  d0,d1           | save in d1  (becomes function offset)
     
    227227
    228228                lsl.w   #3,d0           | develop funcndx[] index
    229                 lea     _funcndx,a0     | setup funcndx[] base address
     229                lea     funcndx,a0      | setup funcndx[] base address
    230230
    231231                tst.l   0(a0,d0.W)      | see if function is defined
     
    299299| ------------------------------------------------------------------------------
    300300
    301 _fputrap:       jmp     (a0)            | dispatch to action handler
     301fputrap:        jmp     (a0)            | dispatch to action handler
    302302
    303303                .page
     
    320320                move.w  d3,d0                   | extract mantissa
    321321                andi.w  #MSK_MNT,d0             | ...
    322                 mulu    _timemlt,d0             | multiply by panel time pot value
     322                mulu    timemlt,d0              | multiply by panel time pot value
    323323                lsr.l   #8,d0                   | ... and scale it
    324324                lsr.l   #7,d0                   | ...
     
    326326                andi.w  #MSK_EXP,d3             | extract exponent code
    327327                add.w   d3,d3                   | look up decoded exponent
    328                 lea     _expbit,a0              | ... in expbit
     328                lea     expbit,a0               | ... in expbit
    329329                move.w  0(a0,d3.W),F_EXP(a3,d1.W)       | send exponent to FPU
    330330                move.w  PT_VAL(a2,d2.W),d3      | get the function value
     
    348348                movem.l d1-d2/a0-a2,-(a7)       | preserve registers around call
    349349                move.w  PT_VMLT(a2,d2.W),-(a7)  | pass multiplier to xgetran()
    350                 jsr     _xgetran                | call for a random number
     350                jsr     xgetran                 | call for a random number
    351351                tst.w   (a7)+                   | clean up stack
    352352                movem.l (a7)+,d1-d2/a0-a2       | restore registers
     
    364364                lsr.w   #6,d0           | shift to a word index
    365365                andi.w  #0x01FE,d0      | mask out extraneous bits
    366                 lea     _ptoftab,a0     | get entry from ptoftab[]
     366                lea     ptoftab,a0      | get entry from ptoftab[]
    367367                move.w  0(a0,d0.W),d5   | ...
    368368                bra     applym          | go apply the multiplier
     
    385385                move.w  FH_TRG(a1),d0   | get the trigger number
    386386                add.w   d0,d0           | ... as a word index
    387                 lea     _veltab,a0      | ... into veltab[]
     387                lea     veltab,a0       | ... into veltab[]
    388388                move.w  0(a0,d0.W),d5   | get the velocity from veltab[trg]
    389389                bra     applym          | go apply the multiplier
     
    397397                move.w  FH_TRG(a1),d0   | get the trigger number
    398398                add.w   d0,d0           | ... as a word index
    399                 lea     _prstab,a0      | ... into prstab[]
     399                lea     prstab,a0       | ... into prstab[]
    400400                move.w  0(a0,d0.W),d5   | get the pressure from prstab[trg]
    401401                bra     applym          | go apply the multiplier
     
    405405| all other sources come out of the valents[] array
    406406| ------------------------------------------------------------------------------
    407 srctyp4:        lea     _vce2grp,a0     | point at vce2grp[]
    408                 move.w  _fpuifnc,d5     | get voice number in d5
     407srctyp4:        lea     vce2grp,a0      | point at vce2grp[]
     408                move.w  fpuifnc,d5      | get voice number in d5
    409409                lsr.w   #3,d5           | ...
    410410                andi.w  #0x001E,d5      | ... as a word index
     
    417417                lsl.w   #2,d0           | ...  via shift and add)
    418418                add.w   d5,d0           | ...
    419                 lea     _valents,a0     | get base of valents[]
     419                lea     valents,a0      | get base of valents[]
    420420                move.w  VT_VAL(a0,d0.W),d5      | get value
    421421
     
    556556| act1 -- AC_SUST -- pause if key is down  (sustain)
    557557| ----    ------------------------------------------
    558 act1:           move.w  _fpuifnc,d0     | get voice as a word index
     558act1:           move.w  fpuifnc,d0      | get voice as a word index
    559559                lsr.w   #3,d0           | ...
    560560                andi.w  #0x001E,d0      | ...
    561                 lea     _vce2trg,a0     | point at voice to trigger table
     561                lea     vce2trg,a0      | point at voice to trigger table
    562562                move.w  0(a0,d0.W),d0   | get trigger table entry into d0
    563563                cmpi.w  #-1,d0          | see if voice is free
     
    570570                bne     act1a           | sustain if so
    571571
    572                 lea     _trgtab,a0      | point at trigger table
     572                lea     trgtab,a0       | point at trigger table
    573573                tst.b   0(a0,d0.W)      | check trigger status
    574574                beq     act0            | continue function if not active
    575575
    576 act1a:          move.l  _pfqhdr,d3      | see if any pflist entries remain
     576act1a:          move.l  pfqhdr,d3       | see if any pflist entries remain
    577577                beq     act0            | continue if not  (shouldn't happen!)
    578578
     
    586586                addi.w  #PT_LEN,d2              | advance the point index
    587587                movea.l d3,a0                   | acquire a new pflist entry
    588                 move.l  (a0),_pfqhdr            | ...
    589                 move.l  _pflist,(a0)            | chain it to pflist
    590                 move.l  a0,_pflist              | ...
     588                move.l  (a0),pfqhdr             | ...
     589                move.l  pflist,(a0)             | chain it to pflist
     590                move.l  a0,pflist               | ...
    591591                move.w  FH_TRG(a1),PF_TRIG(a0)          | set trigger number in entry
    592                 move.w  _fpuifnc,PF_FUNC(a0)            | set v/p word in entry
     592                move.w  fpuifnc,PF_FUNC(a0)             | set v/p word in entry
    593593                movem.l d1-d2/d4/a1-a3,PF_D1(a0)        | set registers in entry
    594594                move.b  FH_TMD(a1),d0           | stop the function
     
    606606| act2 -- AC_ENBL -- stop if key is up
    607607| ----    ----------------------------
    608 act2:           move.w  _fpuifnc,d0     | get voice as a word index
     608act2:           move.w  fpuifnc,d0      | get voice as a word index
    609609                lsr.w   #3,d0           | ...
    610610                andi.w  #0x001E,d0      | ...
    611                 lea     _vce2trg,a0     | check to see if voice is free
     611                lea     vce2trg,a0      | check to see if voice is free
    612612                move.w  0(a0,d0.W),d0   | ...
    613613                cmpi.w  #-1,d0          | ...
     
    620620                bne     act0            | ...
    621621
    622                 lea     _trgtab,a0      | check trigger table entry
     622                lea     trgtab,a0       | check trigger table entry
    623623                tst.b   0(a0,d0.W)      | ...
    624624                bne     act0            | if trigger is active, continue
     
    656656                movem.l d1-d2/a0-a2,-(a7)       | get ranged random number
    657657                move.w  d0,-(a7)                | ...
    658                 jsr     _irand                  | ...
     658                jsr     irand                   | ...
    659659                tst.w   (a7)+                   | ...
    660660                movem.l (a7)+,d1-d2/a0-a2       | ...
     
    677677| act5 -- AC_KYUP -- jump if key is up
    678678| ----    ----------------------------
    679 act5:           move.w  _fpuifnc,d0     | get voice as a word index
     679act5:           move.w  fpuifnc,d0      | get voice as a word index
    680680                lsr.w   #3,d0           | ...
    681681                andi.w  #0x001E,d0      | ...
    682                 lea     _vce2trg,a0     | check to see if voice is free
     682                lea     vce2trg,a0      | check to see if voice is free
    683683                move.w  0(a0,d0.W),d0   | ...
    684684                cmpi.w  #-1,d0          | ...
     
    691691                bne     act0            | ...
    692692
    693                 lea     _trgtab,a0      | check trigger table entry
     693                lea     trgtab,a0       | check trigger table entry
    694694                tst.b   0(a0,d0.W)      | see if the trigger is active
    695695                beq     act3            | if not, do the jump
     
    702702| act6 -- AC_KYDN -- jump if key is down
    703703| ----    ------------------------------
    704 act6:           move.w  _fpuifnc,d0     | get voice as a word index
     704act6:           move.w  fpuifnc,d0      | get voice as a word index
    705705                lsr.w   #3,d0           | ...
    706706                andi.w  #0x001E,d0      | ...
    707                 lea     _vce2trg,a0     | check to see if voice is free
     707                lea     vce2trg,a0      | check to see if voice is free
    708708                move.w  0(a0,d0.W),d0   | ...
    709709                cmpi.w  #-1,d0          | ...
     
    716716                bne     act3            | ...
    717717
    718                 lea     _trgtab,a0      | check trigger table entry
     718                lea     trgtab,a0       | check trigger table entry
    719719                tst.b   0(a0,d0.W)      | see if the trigger is active
    720720                bne     act3            | if so, do the jump
     
    730730| ------------------------------------------------------------------------------
    731731
    732 | _fpuclr -- clear the FPU
    733 | -------    -------------
     732| fpuclr -- clear the FPU
     733| ------    -------------
    734734
    735735|       void
     
    740740| ------------------------------------------------------------------------------
    741741
    742 _fpuclr:        link    a6,#0                   | link stack frames
     742fpuclr:         link    a6,#0                   | link stack frames
    743743                move.w  sr,-(a7)                | save the interrupt level
    744744                ori.w   #0x0700,sr              | turn off interrupts
    745745
    746746                lea     FPUFUNC,a0              | point at the first function
    747                 lea     _fp_resv,a2             | point at reset value table
     747                lea     fp_resv,a2              | point at reset value table
    748748                move.w  #11,d1                  | set the outer loop count
    749749
     
    854854                .page
    855855
    856 | _clrvce -- quiet a voice
    857 | -------    -------------
     856| clrvce -- quiet a voice
     857| ------    -------------
    858858
    859859|       void
     
    863863|               Quiet the voice by resetting the FPU functions it uses.
    864864
    865 _clrvce:        link    a6,#0                   | link stack frames
     865clrvce:         link    a6,#0                   | link stack frames
    866866                move.w  sr,-(a7)                | save the interrupt level
    867867                ori.w   #0x0700,sr              | turn off interrupts
     
    964964| ------------------------------------------------------------------------------
    965965
    966 _fp_resv:       .ds.w   12              | fpu spare function reset values
    967 _fpuifnc:       .ds.w   1               | interrupting function number from FPU
     966fp_resv:        .ds.w   12              | fpu spare function reset values
     967fpuifnc:        .ds.w   1               | interrupting function number from FPU
    968968
    969969                .end
Note: See TracChangeset for help on using the changeset viewer.