- Timestamp:
- 08/07/2017 02:04:35 PM (7 years ago)
- Branches:
- master
- Children:
- 27c8d40
- Parents:
- 84c0125
- Location:
- vlib
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
vlib/acctrl.s
r84c0125 r8325447 28 28 .text 29 29 30 .xdef _objclr,_objoff,_objon30 .xdef objclr,_objoff,objon 31 31 32 .xref _v_actab32 .xref v_actab 33 33 34 34 SCSIZE = 350 | Screen height … … 47 47 | its bit in all words of the access table. 48 48 | ------------------------------------------------------------------------------ 49 _objclr:link a6,#0 | Link stack frames49 objclr: link a6,#0 | Link stack frames 50 50 move.w OBJ(a6),d1 | Get object bit number in d1 51 lea _v_actab,a0 | Get base of object table in a051 lea v_actab,a0 | Get base of object table in a0 52 52 move.w #SCSIZE-1,d2 | Put line count in d2 53 53 … … 73 73 move.w LINE(a6),d2 | Get top line number 74 74 add.w d2,d2 | Convert to word offset 75 lea _v_actab,a0 | Get base address of access table75 lea v_actab,a0 | Get base address of access table 76 76 move.w 0(a0,d2),d0 | Get top line access word 77 77 bset.l d1,d0 | Set object bit … … 101 101 | at 'line' thru 'line'+'num'. Enables the object. 102 102 | ------------------------------------------------------------------------------ 103 _objon: link a6,#0 | Link stack frames103 objon: link a6,#0 | Link stack frames 104 104 move.w OBJ(a6),d1 | Get object bit number into d1 105 105 move.w LINE(a6),d2 | Get top line number 106 106 add.w d2,d2 | Convert to word offset 107 lea _v_actab,a0 | Get base address of access table107 lea v_actab,a0 | Get base address of access table 108 108 move.w 0(a0,d2),d0 | Get top line access word 109 109 bclr.l d1,d0 | Clear object bit -
vlib/glcplot.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _GLCplot17 .xref _lcd_a0,_lcd_a1,_lcdbase16 .xdef GLCplot 17 .xref lcd_a0,lcd_a1,lcdbase 18 18 19 19 XLOC = 8 | 'x' parameter offset … … 27 27 .page 28 28 29 _GLCplot: link a6,#0 | Link stack frames29 GLCplot: link a6,#0 | Link stack frames 30 30 moveq #63,d0 | d0 = (63-y) * 85 31 31 sub.w YLOC(a6),d0 | ... … … 41 41 lsr.w #3,d1 | d1 = (x%6) / 8 42 42 add.w d1,d0 | d0 = cursor address 43 add.w _lcdbase,d0 | ...43 add.w lcdbase,d0 | ... 44 44 move.w d0,d1 | d1 = cursor address, too 45 move.b #G_CRSWR, _lcd_a1| Send cursor address to GLC46 move.b d0, _lcd_a0 | ...45 move.b #G_CRSWR,lcd_a1 | Send cursor address to GLC 46 move.b d0,lcd_a0 | ... 47 47 lsr.w #8,d0 | ... 48 move.b d0, _lcd_a0 | ...49 move.b #G_MREAD, _lcd_a1| Read old pixel byte50 move.b _lcd_a1,d0 | ... into d048 move.b d0,lcd_a0 | ... 49 move.b #G_MREAD,lcd_a1 | Read old pixel byte 50 move.b lcd_a1,d0 | ... into d0 51 51 tst.w VAL(a6) | Check val for zero 52 52 beq glcplt1 | Jump if val EQ 0 … … 57 57 glcplt1: bclr d2,d0 | Clear the pixel to 0 58 58 59 glcplt2: move.b #G_CRSWR, _lcd_a1| Send cursor address to GLC60 move.b d1, _lcd_a0 | ...59 glcplt2: move.b #G_CRSWR,lcd_a1 | Send cursor address to GLC 60 move.b d1,lcd_a0 | ... 61 61 lsr.w #8,d1 | ... 62 move.b d1, _lcd_a0 | ...63 move.b #G_MWRITE, _lcd_a1 | Setup GLC to write pixel64 move.b d0, _lcd_a0 | Write pixel62 move.b d1,lcd_a0 | ... 63 move.b #G_MWRITE,lcd_a1 | Setup GLC to write pixel 64 move.b d0,lcd_a0 | Write pixel 65 65 unlk a6 | Unlink stack frames 66 66 rts | Return to caller -
vlib/tsplot4.s
r84c0125 r8325447 22 22 .text 23 23 24 .xdef _tsplot424 .xdef tsplot4 25 25 26 .xref _cgtable26 .xref cgtable 27 27 28 28 | Argument offsets from a6: … … 68 68 .page 69 69 70 _tsplot4: link a6,#0 | Link stack frames70 tsplot4: link a6,#0 | Link stack frames 71 71 movem.l d3-d6/a3,-(a7) | Save registers we use 72 72 move.w #PSHIFT,d1 | Set shift constant … … 94 94 movea.l a3,a1 | Establish output pointer in a1 95 95 adda.l #HCW,a3 | Update output pointer for next char. 96 lea _cgtable,a0 | Establish CG pointer in a096 lea cgtable,a0 | Establish CG pointer in a0 97 97 lsl.w #1,d0 | ... 2 * character 98 adda.w d0,a0 | ... + _cgtable address98 adda.w d0,a0 | ... + cgtable address 99 99 move.w #VPIX-1,d6 | Set scan line counter in d6 100 100 -
vlib/vbank.s
r84c0125 r8325447 15 15 | Wait for a FRAMESTOP update to transpire. 16 16 | ------------------------------------------------------------------------------ 17 .xdef _vbank18 .xdef _vfwait17 .xdef vbank 18 .xdef vfwait 19 19 20 .xref _v_regs20 .xref v_regs 21 21 22 22 .text … … 42 42 43 43 44 _vbank: link a6,#0 | link stack frames44 vbank: link a6,#0 | link stack frames 45 45 movem.l d5-d7,-(sp) | preserve registers 46 move.w _v_regs+VSDD_R5,OLDB | get v_regs[5]46 move.w v_regs+VSDD_R5,OLDB | get v_regs[5] 47 47 lsr.w #6,OLDB | extract BS bits 48 48 move.w OLDB,d0 | ... … … 66 66 andi.w #256,NEWB | ... 67 67 or.w NEWB,d0 | ... 68 move.w d0, _v_regs+VSDD_R5 | set v_regs[5] with new BS bits68 move.w d0,v_regs+VSDD_R5 | set v_regs[5] with new BS bits 69 69 70 vw1b: cmp.w #VT_1, _v_regs+VSDD_R11 | wait for FRAMESTOP70 vw1b: cmp.w #VT_1,v_regs+VSDD_R11 | wait for FRAMESTOP 71 71 bcc vw1b | ... 72 72 73 vw2b: cmp.w #VT_1, _v_regs+VSDD_R11 | ...73 vw2b: cmp.w #VT_1,v_regs+VSDD_R11 | ... 74 74 bcs vw2b | ... 75 75 76 vw3b: cmp.w #VT_1, _v_regs+VSDD_R11 | ...76 vw3b: cmp.w #VT_1,v_regs+VSDD_R11 | ... 77 77 bcc vw3b | ... 78 78 79 vw4b: cmp.w #VT_2, _v_regs+VSDD_R11 | ...79 vw4b: cmp.w #VT_2,v_regs+VSDD_R11 | ... 80 80 bcs vw4b | ... 81 81 … … 93 93 | ------------------------------------------------------------------------------ 94 94 95 _vfwait:link a6,#0 | link stack frames95 vfwait: link a6,#0 | link stack frames 96 96 97 vw1a: cmp.w #VT_1, _v_regs+VSDD_R11 | wait for FRAMESTOP97 vw1a: cmp.w #VT_1,v_regs+VSDD_R11 | wait for FRAMESTOP 98 98 bcc vw1a | ... 99 99 100 vw2a: cmp.w #VT_1, _v_regs+VSDD_R11 | ...100 vw2a: cmp.w #VT_1,v_regs+VSDD_R11 | ... 101 101 bcs vw2a | ... 102 102 103 vw3a: cmp.w #VT_1, _v_regs+VSDD_R11 | ...103 vw3a: cmp.w #VT_1,v_regs+VSDD_R11 | ... 104 104 bcc vw3a | ... 105 105 106 vw4a: cmp.w #VT_2, _v_regs+VSDD_R11 | ...106 vw4a: cmp.w #VT_2,v_regs+VSDD_R11 | ... 107 107 bcs vw4a | ... 108 108 -
vlib/vclrav.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _vclrav16 .xdef vclrav 17 17 18 18 P_ADR = 8 … … 22 22 P_LEN = 18 23 23 24 _vclrav:link a6,#0 | Link stack frame pointer24 vclrav: link a6,#0 | Link stack frame pointer 25 25 move.w P_ROW(a6),d0 | Get row 26 26 mulu P_LEN(a6),d0 | Multiply by len -
vlib/vcputsv.s
r84c0125 r8325447 22 22 .text 23 23 24 .xdef _vcputsv24 .xdef vcputsv 25 25 26 .xref _cgtable26 .xref cgtable 27 27 28 28 | Argument offsets from a6: … … 69 69 .page 70 70 71 _vcputsv: link a6,#0 | Link stack frames71 vcputsv: link a6,#0 | Link stack frames 72 72 movem.l d3-d6/a3,-(a7) | Save registers we use 73 73 move.w #PSHIFT,d1 | Set shift constant … … 97 97 movea.l a3,a1 | Establish output pointer in a1 98 98 adda.l #HCW,a3 | Update output pointer for next char. 99 lea _cgtable,a0 | Establish CG pointer in a099 lea cgtable,a0 | Establish CG pointer in a0 100 100 lsl.w #1,d0 | ... 2 * character 101 adda.w d0,a0 | ... + _cgtable address101 adda.w d0,a0 | ... + cgtable address 102 102 move.w #VPIX-1,d6 | Set scan line counter in d6 103 103 -
vlib/viint.s
r84c0125 r8325447 19 19 .text 20 20 21 .xdef _VIint | Vertical Interval int. handler22 23 .xdef _vi_sadr| score object base address24 .xdef _vi_scrl| score object scroll offset21 .xdef VIint | Vertical Interval int. handler 22 23 .xdef vi_sadr | score object base address 24 .xdef vi_scrl | score object scroll offset 25 25 .xdef lclsadr | local scroll address 26 26 .xdef lclscrl | local scroll offset … … 32 32 .xdef VIct4 | VSDD interrupt R11 33 33 34 .xref _v_regs | VSDD registers35 .xref _v_odtab| VSDD object descriptor table36 37 .xref _vi_clk | scroll delay timer38 .xref _vi_ctl | unblank control word39 .xref _vi_tag | VSDD 'needs service' tag34 .xref v_regs | VSDD registers 35 .xref v_odtab | VSDD object descriptor table 36 37 .xref vi_clk | scroll delay timer 38 .xref vi_ctl | unblank control word 39 .xref vi_tag | VSDD 'needs service' tag 40 40 41 41 .page … … 47 47 STACKSR = 32 | offset to sr on stack 48 48 V_BLA = 4 | V_BLA (blank) bit number 49 VSDD_R5 = 10 | VSDD R5 byte offset in _v_regs50 VSDD_R11 = 22 | VSDD R11 byte offset in _v_regs49 VSDD_R5 = 10 | VSDD R5 byte offset in v_regs 50 VSDD_R11 = 22 | VSDD R11 byte offset in v_regs 51 51 52 52 VT_BASE = 128 | word offset of VSDD Access Table … … 74 74 .page 75 75 76 | _VIint -- Vertical interval interrupt handler77 | ----- ------------------------------------78 _VIint: movem.l d0-d3/a0-a2/a6,-(a7) | save registers76 | VIint -- Vertical interval interrupt handler 77 | ----- ----------------------------------- 78 VIint: movem.l d0-d3/a0-a2/a6,-(a7) | save registers 79 79 addi.w #0x0100,STACKSR(a7) | raise IPL in sr on the stack 80 80 81 move.w _v_regs+VSDD_R11,VIct1 | save the VSDD R11 value82 83 tst.w _vi_sadr| see if we should scroll81 move.w v_regs+VSDD_R11,VIct1 | save the VSDD R11 value 82 83 tst.w vi_sadr | see if we should scroll 84 84 beq viunbl | jump if not 85 85 … … 87 87 | setup delayed scroll parameters 88 88 | ------------------------------------------------------------------------------ 89 move.w _v_regs+VSDD_R5,d0 | get VSDD R589 move.w v_regs+VSDD_R5,d0 | get VSDD R5 90 90 move.w d0,d1 | save it for later 91 91 andi.w #0x0180,d0 | see if we're already in bank 0 92 92 beq dlyscrl | jump if so 93 93 94 clr.w _v_regs+VSDD_R5 | set bank 095 96 move.w _v_regs+VSDD_R11,VIct2 | save the VSDD R11 value97 98 vw1a: cmp.w #VT_1, _v_regs+VSDD_R11 | wait for FRAMESTOP94 clr.w v_regs+VSDD_R5 | set bank 0 95 96 move.w v_regs+VSDD_R11,VIct2 | save the VSDD R11 value 97 98 vw1a: cmp.w #VT_1,v_regs+VSDD_R11 | wait for FRAMESTOP 99 99 bcc vw1a | ... 100 100 101 vw2a: cmp.w #VT_1, _v_regs+VSDD_R11 | ...101 vw2a: cmp.w #VT_1,v_regs+VSDD_R11 | ... 102 102 bcs vw2a | ... 103 103 104 vw3a: cmp.w #VT_1, _v_regs+VSDD_R11 | ...104 vw3a: cmp.w #VT_1,v_regs+VSDD_R11 | ... 105 105 bcc vw3a | ... 106 106 107 vw4a: cmp.w #VT_2, _v_regs+VSDD_R11 | ...107 vw4a: cmp.w #VT_2,v_regs+VSDD_R11 | ... 108 108 bcs vw4a | ... 109 109 110 dlyscrl: tst.w _vi_tag | wait for previous scroll110 dlyscrl: tst.w vi_tag | wait for previous scroll 111 111 bne dlyscrl | ... 112 112 113 move.w _vi_sadr,lclsadr| save address for timeint114 move.w _vi_scrl,lclscrl| save offset for timeint115 clr.w _vi_sadr| reset for next time116 clr.w _vi_scrl| ...117 move.w vdelay, _vi_clk | set the scroll delay timer118 st _vi_tag | set the 'need service' tag113 move.w vi_sadr,lclsadr | save address for timeint 114 move.w vi_scrl,lclscrl | save offset for timeint 115 clr.w vi_sadr | reset for next time 116 clr.w vi_scrl | ... 117 move.w vdelay,vi_clk | set the scroll delay timer 118 st vi_tag | set the 'need service' tag 119 119 | ------------------------------------------------------------------------------ 120 120 | check for unblank requests 121 121 | ------------------------------------------------------------------------------ 122 move.w _vi_ctl,d2 | get the unblank control word122 move.w vi_ctl,d2 | get the unblank control word 123 123 beq viexit | exit if nothing to unblank 124 124 125 125 bra unblnk | go unblank some objects 126 126 127 viunbl: move.w _vi_ctl,d2 | get the unblank control word127 viunbl: move.w vi_ctl,d2 | get the unblank control word 128 128 beq vidone | exit if nothing to unblank 129 129 130 move.w _v_regs+VSDD_R5,d0 | get VSDD R5130 move.w v_regs+VSDD_R5,d0 | get VSDD R5 131 131 move.w d0,d1 | save it for later 132 132 andi.w #0x0180,d0 | see if we're already in bank 0 133 133 beq unblnk | jump if so 134 134 135 clr.w _v_regs+VSDD_R5 | set bank 0136 137 move.w _v_regs+VSDD_R11,VIct3 | save the VSDD R11 value138 139 vw1b: cmp.w #VT_1, _v_regs+VSDD_R11 | wait for FRAMESTOP135 clr.w v_regs+VSDD_R5 | set bank 0 136 137 move.w v_regs+VSDD_R11,VIct3 | save the VSDD R11 value 138 139 vw1b: cmp.w #VT_1,v_regs+VSDD_R11 | wait for FRAMESTOP 140 140 bcc vw1b | ... 141 141 142 vw2b: cmp.w #VT_1, _v_regs+VSDD_R11 | ...142 vw2b: cmp.w #VT_1,v_regs+VSDD_R11 | ... 143 143 bcs vw2b | ... 144 144 145 vw3b: cmp.w #VT_1, _v_regs+VSDD_R11 | ...145 vw3b: cmp.w #VT_1,v_regs+VSDD_R11 | ... 146 146 bcc vw3b | ... 147 147 148 vw4b: cmp.w #VT_2, _v_regs+VSDD_R11 | ...148 vw4b: cmp.w #VT_2,v_regs+VSDD_R11 | ... 149 149 bcs vw4b | ... 150 150 … … 152 152 153 153 | ------------------------------------------------------------------------------ 154 | unblank objects indicated by contents of d2 (loaded earlier from _vi_ctl)154 | unblank objects indicated by contents of d2 (loaded earlier from vi_ctl) 155 155 | ------------------------------------------------------------------------------ 156 156 157 157 unblnk: clr.w d3 | clear the counter 158 clr.w _vi_ctl | clear the unblank control word159 lea _v_odtab,a1 | point at first object158 clr.w vi_ctl | clear the unblank control word 159 lea v_odtab,a1 | point at first object 160 160 161 161 vicheck: btst d3,d2 | check the object bit … … 181 181 beq vidone | jump if so 182 182 183 viwait: tst.w _vi_tag | wait for timer to run out183 viwait: tst.w vi_tag | wait for timer to run out 184 184 bne viwait | ... so timeint sees bank 0 185 185 186 move.w d1, _v_regs+VSDD_R5 | restore v_regs[5] to old bank187 188 move.w _v_regs+VSDD_R11,VIct4 | save the VSDD R11 value189 190 vw1c: cmp.w #VT_1, _v_regs+VSDD_R11 | wait for FRAMESTOP186 move.w d1,v_regs+VSDD_R5 | restore v_regs[5] to old bank 187 188 move.w v_regs+VSDD_R11,VIct4 | save the VSDD R11 value 189 190 vw1c: cmp.w #VT_1,v_regs+VSDD_R11 | wait for FRAMESTOP 191 191 bcc vw1c | ... 192 192 193 vw2c: cmp.w #VT_1, _v_regs+VSDD_R11 | ...193 vw2c: cmp.w #VT_1,v_regs+VSDD_R11 | ... 194 194 bcs vw2c | ... 195 195 196 vw3c: cmp.w #VT_1, _v_regs+VSDD_R11 | ...196 vw3c: cmp.w #VT_1,v_regs+VSDD_R11 | ... 197 197 bcc vw3c | ... 198 198 199 vw4c: cmp.w #VT_2, _v_regs+VSDD_R11 | ...199 vw4c: cmp.w #VT_2,v_regs+VSDD_R11 | ... 200 200 bcs vw4c | ... 201 201 … … 219 219 | ------------------------------------------------------------------------------ 220 220 221 _vi_sadr: .ds.w 1 | score object base address222 _vi_scrl: .ds.w 1 | score object scroll offset221 vi_sadr: .ds.w 1 | score object base address 222 vi_scrl: .ds.w 1 | score object scroll offset 223 223 224 224 lclsadr: .ds.w 1 | local copy of vi_sadr -
vlib/vputa.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _vputa16 .xdef vputa 17 17 18 18 SBASE = 8 | LONG - 'sbase' … … 21 21 ATTR = 16 | WORD - 'attrib' 22 22 23 _vputa: link a6,#0 | Link stack frame pointer23 vputa: link a6,#0 | Link stack frame pointer 24 24 clr.l d0 | Clear out d0 25 25 move.w ROW(a6),d0 | Get row -
vlib/vputc.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _vputc16 .xdef vputc 17 17 18 _vputc: link a6,#0 | Link stack frame pointer18 vputc: link a6,#0 | Link stack frame pointer 19 19 clr.l d0 | Clear out d0 20 20 move.w 12(a6),d0 | Get row -
vlib/vputcv.s
r84c0125 r8325447 15 15 .text 16 16 17 .xdef _vputcv17 .xdef vputcv 18 18 19 19 P_ADR = 8 … … 26 26 .page 27 27 28 _vputcv:link a6,#0 | Link stack frame pointer28 vputcv: link a6,#0 | Link stack frame pointer 29 29 move.w P_ROW(a6),d0 | Get row 30 30 mulu P_LEN(a6),d0 | Multiply by len -
vlib/vputp.s
r84c0125 r8325447 32 32 .text 33 33 34 .xdef _vputp34 .xdef vputp 35 35 36 36 OCTAD = 8 … … 51 51 .page 52 52 53 _vputp: link a6,#0 | Link stack frames53 vputp: link a6,#0 | Link stack frames 54 54 movea.l OCTAD(a6),a1 | Get OCTAD base into a1 55 55 move.w XLOC(a6),d0 | Get XLOC into d0 -
vlib/vsetav.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _vsetav16 .xdef vsetav 17 17 18 18 P_ADR = 8 … … 22 22 P_LEN = 18 23 23 24 _vsetav:link a6,#0 | Link stack frame pointer24 vsetav: link a6,#0 | Link stack frame pointer 25 25 move.w P_ROW(a6),d0 | Get row 26 26 mulu P_LEN(a6),d0 | Multiply by len -
vlib/vsetcv.s
r84c0125 r8325447 14 14 .text 15 15 16 .xdef _vsetcv16 .xdef vsetcv 17 17 18 18 P_ADR = 8 … … 22 22 P_LEN = 18 23 23 24 _vsetcv:link a6,#0 | Link stack frame pointer24 vsetcv: link a6,#0 | Link stack frame pointer 25 25 move.w P_ROW(a6),d0 | Get row 26 26 mulu P_LEN(a6),d0 | Multiply by len -
vlib/vsplot4.s
r84c0125 r8325447 24 24 .text 25 25 26 .xdef _vsplot426 .xdef vsplot4 27 27 28 28 | Argument offsets from a6: … … 69 69 .page 70 70 71 _vsplot4: link a6,#0 | Link stack frames71 vsplot4: link a6,#0 | Link stack frames 72 72 movem.l d3-d6/a3,-(a7) | Save registers we use 73 73 move.w #PSHIFT,d1 | Set shift constant -
vlib/vvputsv.s
r84c0125 r8325447 22 22 .text 23 23 24 .xdef _vvputsv24 .xdef vvputsv 25 25 26 26 | Argument offsets from a6: … … 68 68 .page 69 69 70 _vvputsv: link a6,#0 | Link stack frames70 vvputsv: link a6,#0 | Link stack frames 71 71 movem.l d3-d6/a3,-(a7) | Save registers we use 72 72 move.w #PSHIFT,d1 | Set shift constant -
vlib/vwputp.s
r84c0125 r8325447 35 35 .text 36 36 37 .xdef _vputp37 .xdef vputp 38 38 39 39 OCTAD = 8
Note:
See TracChangeset
for help on using the changeset viewer.