1: / list pieces controlling a square
   2: 
   3: .globl  _attack
   4: 
   5: .globl  _dir, _board
   6: .globl  _attacv
   7: 
   8: none    = 12345
   9: uleft   = 04040;
  10: uright  = 04004;
  11: dleft   = 00440;
  12: dright  = 00404;
  13: left    = 00040;
  14: right   = 00004;
  15: up      = 04000;
  16: down    = 00400;
  17: u2r1    = 06004;
  18: u1r2    = 04006;
  19: d1r2    = 00406;
  20: d2r1    = 00604;
  21: d2l1    = 00640;
  22: d1l2    = 00460;
  23: u1l2    = 04060;
  24: u2l1    = 06040;
  25: 
  26: _attack:
  27:         mov     2(sp),r0
  28:         asl     r0
  29:         mov     $_attacv,r4
  30: 
  31:         jsr     r5,patt
  32:                 u2r1
  33:                 -15.*2
  34:                 2; -2
  35:         jsr     r5,patt
  36:                 u1r2
  37:                 -6.*2
  38:                 2; -2
  39:         jsr     r5,patt
  40:                 d2r1
  41:                 17.*2
  42:                 2; -2
  43:         jsr     r5,patt
  44:                 d2l1
  45:                 15.*2
  46:                 2; -2
  47:         jsr     r5,patt
  48:                 d1l2
  49:                 6.*2
  50:                 2; -2
  51:         jsr     r5,patt
  52:                 u1l2
  53:                 -10.*2
  54:                 2; -2
  55:         jsr     r5,patt
  56:                 u2l1
  57:                 -17.*2
  58:                 2; -2
  59: 
  60:         jsr     r5,satt
  61:                 uleft; -9.*2
  62:                 1
  63:                 3; -3; 5; -5
  64:         jsr     r5,satt
  65:                 uright; -7.*2
  66:                 1
  67:                 3; -3; 5; -5
  68:         jsr     r5,satt
  69:                 dleft; 7.*2
  70:                 -1
  71:                 3; -3; 5; -5
  72:         jsr     r5,satt
  73:                 dright; 9.*2
  74:                 -1
  75:                 3; -3; 5; -5
  76:         jsr     r5,satt
  77:                 up; -8.*2
  78:                 none
  79:                 4; -4; 5; -5
  80:         jsr     r5,satt
  81:                 left; -1.*2
  82:                 none
  83:                 4; -4; 5; -5
  84:         jsr     r5,satt
  85:                 right; 1.*2
  86:                 none
  87:                 4; -4; 5; -5
  88:         jsr     r5,satt
  89:                 down; 8.*2
  90:                 none
  91:                 4; -4; 5; -5
  92:         clr     (r4)+
  93:         rts     pc
  94: 
  95: patt:
  96:         bit     (r5)+,_dir(r0)
  97:         bne     1f
  98:         mov     r0,r1
  99:         add     (r5)+,r1
 100:         jsr     pc,look
 101:         jsr     pc,look
 102:         rts     r5
 103: 1:
 104:         add     $6,r5
 105:         rts     r5
 106: 
 107: satt:
 108:         mov     r5,-(sp)
 109:         bit     (r5)+,_dir(r0)
 110:         bne     1f
 111:         mov     r0,r1
 112:         add     (r5)+,r1
 113:         jsr     pc,look                 / pawn
 114:         mov     r0,r1
 115: 2:
 116:         mov     (sp),r5
 117:         bit     (r5)+,_dir(r1)
 118:         bne     1f
 119:         add     (r5)+,r1
 120:         tst     _board(r1)
 121:         beq     2b
 122:         tst     (r5)+
 123:         mov     r4,-(sp)
 124:         jsr     pc,look
 125:         jsr     pc,look
 126:         jsr     pc,look
 127:         jsr     pc,look
 128:         cmp     (sp)+,r4
 129:         bne     2b
 130: 1:
 131:         mov     (sp)+,r5
 132:         add     $14.,r5
 133:         rts     r5
 134: 
 135: look:
 136:         cmp     (r5)+,_board(r1)
 137:         bne     1f
 138:         mov     -2(r5),(r4)+
 139: 1:
 140:         rts     pc

Defined functions

_attack declared in line 3; defined in line 26; used 2 times
d1l2 defined in line 22; used 1 times
  • in line 48
d1r2 defined in line 19; never used
d2l1 defined in line 21; used 1 times
  • in line 44
d2r1 defined in line 20; used 1 times
  • in line 40
dleft defined in line 11; used 1 times
  • in line 69
down defined in line 16; used 1 times
  • in line 89
dright defined in line 12; used 1 times
  • in line 73
left defined in line 13; used 1 times
  • in line 81
look defined in line 135; used 7 times
none defined in line 8; used 4 times
patt defined in line 95; used 7 times
right defined in line 14; used 1 times
  • in line 85
satt defined in line 107; used 8 times
u1l2 defined in line 23; used 1 times
  • in line 52
u1r2 defined in line 18; used 1 times
  • in line 36
u2l1 defined in line 24; used 1 times
  • in line 56
u2r1 defined in line 17; used 1 times
  • in line 32
uleft defined in line 9; used 1 times
  • in line 61
up defined in line 15; used 1 times
  • in line 77
uright defined in line 10; used 1 times
  • in line 65
Last modified: 1979-05-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2200
Valid CSS Valid XHTML 1.0 Strict