; DOOM 83 ; a BAM production ; by David Fifield ; (C)BAM1999 ;New new version started: 11-10-1999 .NOLIST #define END .end #define end .end #define EQU .equ #define equ .equ #include "ti83asm.inc" #include "tokens.inc" .LIST ;#define TWO_COLS #ifdef TWO_COLS #define ANGLE_DELTA -0100h ;-1, -1.40625° #else #define ANGLE_DELTA -0080h ;-.5, -.703125° #endif .org 9327h MAIN: ; ld hl, 0500h ; ld (p_x), hl ; ld hl, 0500h ; ld (p_y), hl ; ld hl, 0000h ; ld (p_theta), hl ; call CALC_DIST ld de, 0100h call SQRT_FP call _disphl ret ;End of MAIN ;***GLOBALS (to be replaced by an object table) p_x: ;Player's x location .dw 0000h p_y: ;Player's y location .dw 0000h p_theta: ;Player's angle .dw 0000h CALC_DIST: ;Store distances to wall for each column to an array ;INPUT: (p_x), (p_y), (p_theta) ;OUTPUT: Array at calc_dist_arr_dist ld hl, (p_theta) ld bc, 1800h ;24.00 is half of range of view, 33.75 degrees add hl, bc #ifdef TWO_COLS ld a, 48d #else ld a, 96d #endif calc_dist_loop: push af ld (calc_dist_var_alpha), hl call HORZ_DIST ld (calc_dist_var_horz_x_dist), hl call VERT_DIST ld (calc_dist_var_vert_x_dist), hl ld bc, (calc_dist_var_horz_x_dist) xor a sbc hl, bc jr nc, calc_dist_horz_closer ;If the vertical intersection was closer ld hl, (vert_dist_var_x) ld bc, (p_x) xor a sbc hl, bc ;Difference between X coordinates call SQUARE_FP jr calc_dist_add_entry calc_dist_horz_closer: ;If the horizontal intersection was closer ld bc, (horz_dist_var_x) calc_dist_add_entry: pop af ;The column push af sla a ;a *= 2 ld e, a ld d, 0 #ifdef TWO_COLS ld hl, 48 * 2 + calc_dist_arr_dist #else ld hl, 96 * 2 + calc_dist_arr_dist #endif xor a sbc hl, de ld (hl), c ;LSB inc hl ld (hl), b ;MSB ld hl, (calc_dist_var_alpha) #ifdef TWO_COLS ld bc, -0100h ;-1 #else ld bc, -0080h ;-1/2 #endif add hl, bc pop af dec a jr nz, calc_dist_loop ret ;End of CALC_DIST calc_dist_var_alpha: ;Alpha, the angle of the current ray .dw 0000h calc_dist_var_horz_x_dist: ;abs((p_x) - (horz_dist_var_x)) .dw 0000h calc_dist_var_vert_x_dist: ;abs((p_x) - (vert_dist_var_x)) .dw 0000h calc_dist_arr_dist: ;This is the array to which we store the distances #ifdef TWO_COLS .block 48 * 2 ;48 words #else .block 96 * 2 ;96 words #endif HORZ_DIST: ;Location of intersection between ray and horizontal wall ;INPUT: (p_x), (p_y) ; (calc_dist_var_alpha)=angle of ray ;OUTPUT: (horz_dist_var_x)=X coordinate ; (horz_dist_var_y)=Y coordinate ; hl=abs((p_x) - (horz_dist_var_x)) ld hl, (calc_dist_var_alpha) bit 7, h ;Is the ray facing up or down? jr nz, horz_dist_down horz_dist_up: ld hl, (p_y) ;int(hl) - 0001h dec h ;THIS IS NOT EXACT; the intersection should really ld l, 0FFh ;be at int(hl) ld (horz_dist_var_y), hl ld hl, -0100h ;Delta is -1 ld (horz_dist_var_y_del), hl ld hl, 4000h ;90 degrees ld bc, (calc_dist_var_alpha) xor a ;Reset carry sbc hl, bc call TAN ;tan(90 - n) == 1 / tan(n) ld (horz_dist_var_tan), bc ;bc = tangent jr horz_dist_get_x horz_dist_down: ld hl, (p_y) ;int(hl) + 0100h inc h ;This one is exact. ld l, 00h ;(I think) ld (horz_dist_var_y), hl ld hl, 0100h ;Delta is 1 ld (horz_dist_var_y_del), hl ld hl, 4000h ;90 degrees ld bc, (calc_dist_var_alpha) xor a ;Reset carry sbc hl, bc call TAN ;tan(90 - n) == 1 / tan(n) ;We need to negate the tangent value ld a, b cpl ld b, a ld a, c cpl ld c, a inc bc ld (horz_dist_var_tan), bc horz_dist_get_x: ld (horz_dist_var_x_del), bc ;bc should equal 1 / tan(alpha) ld d, b ld e, c ld hl, (p_y) ld bc, (horz_dist_var_y) xor a ;Reset carry sbc hl, bc ;abs(hl - bc) should be < 1 ld a, h cp 0 jr z, horz_dist_no_abs ;If h != 0, then it is negative, so get absolute value of fractional part ld a, l neg ;a = -a ld l, a horz_dist_no_abs: ld c, a ;Remember, de == 1 / tan(alpha) call MULT_FP ;abs((p_y) - (y)) / tan(alpha) ld bc, (p_x) add hl, bc ld (horz_dist_var_x), hl ;We now have the X an Y coordinates and their deltas. Now we ;add the deltas to the coordinates until we hit a wall. horz_dist_loop: ld a, (horz_dist_var_x+1) ;MSB and 11100000b ;Just checking for overflow; are we still in the map? jp nz, horz_dist_out_of_map ld a, (horz_dist_var_y+1) ;MSB and 11100000b jp nz, horz_dist_out_of_map ld l, 00h ld a, (horz_dist_var_y+1) ;MSB ld h, a srl h rr l srl h rr l srl h rr l ;hl = int(hl) << 5 ld a, (horz_dist_var_x+1) ;MSB (integer part) or l ;a won't be > 31 (5 bits) ld l, a ;Now hl = 32 * (y) + (x) ld de, map_e1m1 add hl, de ld a, (hl) ;What have we hit? cp 0 jr nz, horz_dist_hit ;If a wall ;Find next intersection ld hl, (horz_dist_var_x) ld bc, (horz_dist_var_x_del) add hl, bc ld (horz_dist_var_x), hl ld hl, (horz_dist_var_y) ld bc, (horz_dist_var_y_del) add hl, bc ld (horz_dist_var_y), hl jr horz_dist_loop ;Try again horz_dist_hit: ;We have the intersection, and the coordinates are stored to the ;correct variables. Now we must calculate abs((p_x) - (x)) ld hl, (p_x) ld bc, (horz_dist_var_x) xor a sbc hl, bc ret nc ;Return if difference is positive ld a, h cpl ld h, a ld a, l cpl ld l, a inc hl ret ;End of HORZ_DIST horz_dist_out_of_map: ld hl, 07FFFh ld (horz_dist_var_x), hl ld (horz_dist_var_y), hl ret ;Return for invalid coordinates horz_dist_var_tan: ;1 / tan(alpha), negated if alpha >= 128 .dw 0000h horz_dist_var_x: ;X coordinate .dw 0000h horz_dist_var_y: ;Y coordinate .dw 0000h horz_dist_var_x_del: ;Delta for X coordinate .dw 0000h horz_dist_var_y_del: ;Delta for Y coordinate .dw 0000h VERT_DIST: ;Location of intersection between ray and vertical wall ;INPUT: (p_x), (p_y) ; (calc_dist_var_alpha)=angle of ray ;OUTPUT: (vert_dist_var_x)=X coordinate ; (vert_dist_var_y)=Y coordinate ; hl=abs((p_x) - (vert_dist_var_x)) ld hl, (calc_dist_var_alpha) ld bc, -4000h add hl, bc ;Like subtracting 90 degrees bit 7, h ;Is the ray facing left or right? jr nz, vert_dist_right vert_dist_left: ld hl, (p_x) ;int(hl) - 0001h dec h ;THIS IS NOT EXACT; the intersection should really ld l, 0FFh ;be at int(hl) ld (vert_dist_var_x), hl ld hl, -0100h ;Delta is -1 ld (vert_dist_var_x_del), hl ld hl, (calc_dist_var_alpha) call TAN ld (vert_dist_var_tan), bc ;bc = tangent jr vert_dist_get_y vert_dist_right: ld hl, (p_x) ;int(hl) + 0100h inc h ;This one is exact. ld l, 00h ;(I think) ld (vert_dist_var_x), hl ld hl, 0100h ;Delta is 1 ld (vert_dist_var_x_del), hl ld hl, (calc_dist_var_alpha) call TAN ;We need to negate the tangent value ld a, b cpl ld b, a ld a, c cpl ld c, a inc bc ld (vert_dist_var_tan), bc vert_dist_get_y: ld (vert_dist_var_y_del), bc ;bc should equal tan(alpha) ld d, b ld e, c ld hl, (p_x) ld bc, (vert_dist_var_x) xor a ;Reset carry sbc hl, bc ;abs(hl - bc) should be < 1 ld a, h cp 0 jr z, vert_dist_no_abs ;If h != 0, then it is negative, so get absolute value of fractional part ld a, l neg ;a = -a ld l, a vert_dist_no_abs: ld c, a ;Remember, de == tan(alpha) call MULT_FP ;abs((p_x) - (x)) * tan(alpha) ld bc, (p_y) add hl, bc ld (vert_dist_var_y), hl ;We now have the X an Y coordinates and their deltas. Now we ;add the deltas to the coordinates until we hit a wall. vert_dist_loop: ld a, (vert_dist_var_x+1) ;MSB and 11100000b ;Just checking for overflow; are we still in the map? jp nz, vert_dist_out_of_map ld a, (vert_dist_var_y+1) ;MSB and 11100000b jp nz, vert_dist_out_of_map ld l, 00h ld a, (vert_dist_var_y+1) ;MSB ld h, a srl h rr l srl h rr l srl h rr l ;hl = int(hl) << 5 ld a, (vert_dist_var_x+1) ;MSB (integer part) or l ;a won't be > 31 (5 bits) ld l, a ;Now hl = 32 * (y) + (x) ld de, map_e1m1 add hl, de ld a, (hl) ;What have we hit? cp 0 jr nz, vert_dist_hit ;If a wall ;Find next intersection ld hl, (vert_dist_var_x) ld bc, (vert_dist_var_x_del) add hl, bc ld (vert_dist_var_x), hl ld hl, (vert_dist_var_y) ld bc, (vert_dist_var_y_del) add hl, bc ld (vert_dist_var_y), hl jr vert_dist_loop ;Try again vert_dist_hit: ;We have the intersection, and the coordinates are stored to the ;correct variables. Now we must calculate abs((p_x) - (x)) ld hl, (p_x) ld bc, (vert_dist_var_x) xor a sbc hl, bc ret nc ;Return if difference is positive ld a, h cpl ld h, a ld a, l cpl ld l, a inc hl ret ;End of VERT_DIST vert_dist_out_of_map: ld hl, 07FFFh ld (vert_dist_var_x), hl ld (vert_dist_var_y), hl ret ;Return for invalid coordinates vert_dist_var_tan: ;tan(alpha), negated if alpha >= 128 .dw 0000h vert_dist_var_x: ;X coordinate .dw 0000h vert_dist_var_y: ;Y coordinate .dw 0000h vert_dist_var_x_del: ;Delta for X coordinate .dw 0000h vert_dist_var_y_del: ;Delta for Y coordinate .dw 0000h ; MULT_FP: adapted from ; MATHLIB: a 16 Bit Arithmetic Package for Z80 ; Sourced 26 Nov '80 by Trevor Marshall ; SYSOP, Thousand Oaks Tech RBBS MULT_FP: ;16-bit by 8-bit fixed-point multiply ;INPUT: c=8-bit multiplier ; de=16-bit multiplicand ;OUTPUT: hl=fixed-point product ld b, e ;LSB of multiplicand ld e, d ;MSB ld d, 00h ld a, 8 ;Loop count ld hl, 0 ;Clear result mult_fp_mult: ;Is multiplier LSb 1? srl c ;Right shift multiplier ;0 -> c -> carry jr nc, mult_fp_noadd ;LSb != 1; don't add add hl, de ;LSb == 1; add shifted multiplicand to result mult_fp_noadd: ;Now we shift the multiplicand left. ;We restore the fractional bits which are initially stored in c. sla b ;carry <- b <- 0 rl e ;carry <- b <- carry rl d ;carry <- b <- carry dec a ;Loop count jr nz, mult_fp_mult ret nc ;End of MULT_FP, if positive multiplicand set 7, h ;Make negative ret ;End of MULT_FP SQUARE_FP: ;Fixed-point square ;INPUT bc=value ;OUTPUT bchl=value**2 (32 bits, b == 00h) ; ld a, 0F0h ;We test the 4 MS bits ; and b ;If they are nonzero, there is overflow ; jr nz, square_fp_no_overflow ; ld hl, 0FFFFh ;Infinity ; ret square_fp_no_overflow: ld a, 16 ;Loop count ld hl, 0000h ;Zero result ld d, b ld e, c ;Another copy of number square_fp_loop: add hl, hl ;hl <<= 2 rl c rl b ;This is a big shift of 4 registers jr nc, square_fp_noadd ;If MSb of b == 1 add hl, de ;de is the neatly preserved initial value square_fp_noadd: dec a jr nz, square_fp_loop ;bchl is the 32-bit result; we must shift right by 8 to compensate for fixed-point ld l, h ld h, c ld c, b ld b, 00h ;If at this point c != 0, there was overflow. Let the caller worry about this. ret ;End of SQUARE_FP ;SQRT_FP: ;Fixed-point square root ; ;INPUT: de=value ; ;OUTPUT: hl=sqrt(value) ; ld hl, 0000h ;r ; ld bc, 4000h ;t ; ;sqrt_fp_loop: ; add hl, bc ;r + t ; ld (sqrt_fp_modify + 1), hl ;Modify the part down there ; sbc hl, de ; jp p, sqrt_fp_greater ; ; ld a, h ; cpl ; ld d, a ; ld a, l ; cpl ; ld e, a ; inc de ;de = -hl ; ;sqrt_fp_modify: ; ld hl, 00h ;This is the part that's modified ; add hl, bc ;s + t ; ;sqrt_fp_greater: ; srl h ; rr l ; srl b ; rr c ; srl b ; rr c ; ; jr nz, sqrt_fp_loop ; ;; add hl, hl ;; add hl, hl ;; add hl, hl ;; add hl, hl ;hl <<= 4, to compensate for fixed-point ; ; ret ;End of SQRT_FP SQRT_FP: ;Fixed-point square root ;INPUT: de=value ;OUTPUT: hl=sqrt(value) ld hl, 4000h ld (sqrt_fp_var_count), hl ld bc, 0000h sqrt_fp_loop: ld hl, (sqrt_fp_var_count) add hl, bc sbc hl, de ;Carry should be zero jr z, sqrt_fp_same ;If hl == de jp p, sqrt_fp_next ;If hl > de sqrt_fp_same: ld a, h cpl ld d, a ld a, l cpl ld e, a inc de ;de = -hl ld hl, (sqrt_fp_var_count) add hl, hl add hl, bc ld b, h ld c, l sqrt_fp_next: srl b rr c ;bc >>= 1 ld a, (sqrt_fp_var_lsb) rra ;Save bits ld (sqrt_fp_var_lsb), a ld hl, (sqrt_fp_var_count) srl h rr l srl h rr l ld (sqrt_fp_var_count), hl ld a, h or l jr nz, sqrt_fp_loop ld h, b ld l, c ;Now we shift hl left to compensate for fixed-point ld a, (sqrt_fp_var_lsb) rla ;Recover bits adc hl, hl rla adc hl, hl rla adc hl, hl rla adc hl, hl ret ;End of SQRT_FP sqrt_fp_var_count: .dw 0000h ;Not really a counter, I guess sqrt_fp_var_lsb: .db 00h ;4 LSbs of the calculation TAN: ;Tangent ;INPUT hl=angle ;OUTPUT bc=tangent of angle ld a, l and 80h or h ld l, a ld h, 00h rlc l ;Rotate left circular sla l ;carry <- l <- 0 rl h ;carry <- h <- carry ;What we have done is basically hl = (hl >> 6) & 01FEh ld bc, tangent_table add hl, bc ld c, (hl) ;LSB inc hl ld b, (hl) ;MSB; bc = tangent ret ;End of TAN ;The tangent table has 256 entries, representing the angles 0-127.5 ;Each entry is a 2-byte fixed-point word. Entries exist for each .5 tangent_table: .dw 00000h, 00003h, 00006h, 00009h, 0000Ch, 0000Fh, 00012h, 00016h, 00019h, 0001Ch, 0001Fh, 00022h, 00025h, 00029h, 0002Ch, 0002Fh .dw 00032h, 00036h, 00039h, 0003Ch, 00040h, 00043h, 00046h, 0004Ah, 0004Dh, 00051h, 00054h, 00058h, 0005Bh, 0005Fh, 00062h, 00066h .dw 0006Ah, 0006Dh, 00071h, 00075h, 00079h, 0007Ch, 00080h, 00084h, 00088h, 0008Ch, 00091h, 00095h, 00099h, 0009Dh, 000A2h, 000A6h .dw 000ABh, 000AFh, 000B4h, 000B9h, 000BDh, 000C2h, 000C7h, 000CCh, 000D2h, 000D7h, 000DCh, 000E2h, 000E8h, 000EDh, 000F3h, 000F9h .dw 00100h, 00106h, 0010Ch, 00113h, 0011Ah, 00121h, 00128h, 00130h, 00137h, 0013Fh, 00148h, 00150h, 00159h, 00162h, 0016Bh, 00175h .dw 0017Fh, 00189h, 00194h, 0019Fh, 001ABh, 001B7h, 001C3h, 001D1h, 001DEh, 001EDh, 001FCh, 0020Ch, 0021Dh, 0022Eh, 00241h, 00255h .dw 0026Ah, 00280h, 00297h, 002B0h, 002CBh, 002E8h, 00306h, 00328h, 0034Bh, 00372h, 0039Dh, 003CBh, 003FEh, 00435h, 00474h, 004B9h .dw 00506h, 0055Eh, 005C3h, 00637h, 006BDh, 0075Ch, 0081Bh, 00904h, 00A27h, 00B9Ch, 00D8Eh, 01046h, 0145Ah, 01B26h, 028BCh, 0517Bh .dw 07FFFh, 0AE85h, 0D744h, 0E4DAh, 0EBA6h, 0EFBAh, 0F272h, 0F464h, 0F5D9h, 0F6FCh, 0F7E5h, 0F8A4h, 0F943h, 0F9C9h, 0FA3Dh, 0FAA2h .dw 0FAFAh, 0FB47h, 0FB8Ch, 0FBCBh, 0FC02h, 0FC35h, 0FC63h, 0FC8Eh, 0FCB5h, 0FCD8h, 0FCFAh, 0FD18h, 0FD35h, 0FD50h, 0FD69h, 0FD80h .dw 0FD96h, 0FDABh, 0FDBFh, 0FDD2h, 0FDE3h, 0FDF4h, 0FE04h, 0FE13h, 0FE22h, 0FE2Fh, 0FE3Dh, 0FE49h, 0FE55h, 0FE61h, 0FE6Ch, 0FE77h .dw 0FE81h, 0FE8Bh, 0FE95h, 0FE9Eh, 0FEA7h, 0FEB0h, 0FEB8h, 0FEC1h, 0FEC9h, 0FED0h, 0FED8h, 0FEDFh, 0FEE6h, 0FEEDh, 0FEF4h, 0FEFAh .dw 0FF00h, 0FF07h, 0FF0Dh, 0FF13h, 0FF18h, 0FF1Eh, 0FF24h, 0FF29h, 0FF2Eh, 0FF34h, 0FF39h, 0FF3Eh, 0FF43h, 0FF47h, 0FF4Ch, 0FF51h .dw 0FF55h, 0FF5Ah, 0FF5Eh, 0FF63h, 0FF67h, 0FF6Bh, 0FF6Fh, 0FF74h, 0FF78h, 0FF7Ch, 0FF80h, 0FF84h, 0FF87h, 0FF8Bh, 0FF8Fh, 0FF93h .dw 0FF96h, 0FF9Ah, 0FF9Eh, 0FFA1h, 0FFA5h, 0FFA8h, 0FFACh, 0FFAFh, 0FFB3h, 0FFB6h, 0FFBAh, 0FFBDh, 0FFC0h, 0FFC4h, 0FFC7h, 0FFCAh .dw 0FFCEh, 0FFD1h, 0FFD4h, 0FFD7h, 0FFDBh, 0FFDEh, 0FFE1h, 0FFE4h, 0FFE7h, 0FFEAh, 0FFEEh, 0FFF1h, 0FFF4h, 0FFF7h, 0FFFAh, 0FFFDh ;Levels map_e1m1: .dw 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0001h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0000h, 0100h .dw 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h, 0101h .end END