Would you like to order my
HOME = ANALYZE ![]() LOADO.BD ![]() DEBUG.COM > FILE.TXT '<'ENTER'>' ![]() |
NAME KVVCHESS.COM TITLE 'KVVCHESS.ASM VERS. 2.8 AUGUST 1997' ;;NOTE: THIS IS ONLY A TEXT OF MY COM -IT WAS 'TASM'ED ONLY: SEE BOTTOM LINES. PAGE ,132 .8087 KFFFF EQU 0FFFFH KB800 EQU 0B800H KBA00 EQU 0BA00H K0101P EQU 2F01H K0110 EQU K0101P+0FH K0116 EQU K0101P+15H ;NOTE 101 MUST START AT 1 K0117 EQU K0101P+16H K0121 EQU K0101P+20H K0135 EQU K0101P+34H K013F EQU K0101P+3EH K0149 EQU K0101P+48H K0153 EQU K0101P+52H K015D EQU K0101P+5CH K0167 EQU K0101P+66H K0AD3 EQU 0AD3H ;JMPS WHITE SIDE TO GET BLACK START @AC4 MYCODE SEGMENT PARA 'CODE' ;{{ ASSUME CS:MYCODE,DS:MYDATA,SS:STACK1 MAIN PROC FAR ;{ ;K0275 PROC NEAR ;0.0- MAIN_LOOP {(( ;;K0100: ;;JMP K0275 ;;K0275: ;XOR AX,AX ;MOV AX,MYDATA ;PUSH AX ;POP DS LEA SI,K0E10 MOV K0E10P,SI ;K0E10 EQU E10H K0E20 EQU K0E10P+10H ;NOTE THESE MUST SIT AT ZERO START K0E30 EQU K0E10P+20H K0E40 EQU K0E10P+30H K0E50 EQU K0E10P+40H K0E60 EQU K0E10P+50H K0E5A EQU K0E10P+5AH K0E70 EQU K0E10P+60H MOV AX,5 INT 10H CALL K024B ;284 2.0-0 CLEAR_BOARD CALL K0C72 ;27A 1.0-0 SET_CURSOR_BOTTOM LEA DX,K13E4 ;K13E4 DB 20H,20H,'USE ARROW KEYS TO MOVE CHESSMEN: ... $' MOV AH,9 ;PRNT MSSG INT 21H ;AH=8/INT/CMPAL,0/-SEE 3.0 CALL K10C4 ;287 3.0-0 LOAD_BOARD/CONVERT MOV BP,0 LEA AX,K041F MOV WORD PTR K01FB,AX ;PRNT NUMBERS '1-8' <<1410>> CLD MOV BX,KFFFF MOV DI,19AH ;# SCRN START MOV CH,8 K029D: MOV AX,KBA00 MOV ES,AX PUSH CX PUSH DI CALL K02DF ;2A4 4.0-0 PRNT_CHAR$ POP DI POP CX ADD DI,370H ;ADD ROWS ADD WORD PTR K01FB,8 DEC CH JNZ K029D LEA SI,K01BB MOV K01FB,SI ;PRNT LETTERS 'A-H' <<<1450>> MOV DI,1C28H ;START MOV CH,8 K02C1: MOV AX,0BA00H MOV ES,AX ADD DI,8 PUSH CX PUSH DI CALL K02DF ;2CB 5.0=4.0-0 PRNT_CHAR$ POP DI ;SAME ROW POP CX ADD WORD PTR K01FB,8 DEC CH CMP CH,0 JNZ K02C1 ;;JMP K0AC4 ;2DC) ;;K0AC4 PROC NEAR ; MAIN CONT'D {( CALL K049F ;AC4 6.0-0 LOGO CALL K0A9A ;AC7 7.0-1 RESET_VERT_TIME CALL K039E ;ACA 8.0-3 PRNT_BRD/CONVERT/KILLS/VERT_TIME/SAVE_BACK_UP K0ACD: ;EB 09:JMP K0AD8 BLACK_1ST K0ACF: ;<-. CALL K0D00 ;ACD 9.0-1 INIT_WHITE/SAVE/SAVE_BACK_UP-B +++ CALL K0D40 ;AD0 10.0-0 STORE_TIME_NEG K0AD4: ;WHITE TURN CALL K0C7E ;AD4 11.0-12 PLAY_LOOP/WHITE/GET_KEY/ACTIVAT_SQ. CALL K0D1F ;AD7 12.0-0 INIT_BLACK_SIDE/SAVE_BACK_UP-W +++ CALL K0D40 ;ADA 13.0=10.0-0 STORE_TIME_NEG K0ADE: ;BLACK TURN CALL K0C7E ;ADE 14.0=11.0-12 PLAY_LOOP/BLACK/GET_KEY/ACTIVAT_SQ. JMP K0ACF;>-' RET ;AE2) ;;K0AC4 ENDP ;MAIN } ;;K0275 ENDP ;} MAIN ENDP ;} K01C0 PROC NEAR ;11.3.1 'BACK_UP'_BD {(( CMP BYTE PTR K0100,1 ;FIND_LAST_SCRN JNB K01C8 RET ;1C7) ;QUIT_LAST_SCREEN K01C8: DEC K0100 ;BCK_UP_BD_COUNT POP BP ;STORE_RETURNS POP AX POP K017B PUSH CS POP ES MOV SI,SP ADD SI,4EH ;FIND_LAST_SP MOV BX,[SI] MOV CX,27H ;80d-2_BYTES MOV DI,K0117 DEC SI DEC SI CLD K01E0: MOVSW ;RESTORE_BACK_UP_BD SUB SI,4 LOOP K01E0 MOV SP,BX NOP ;POP BX ERROR = [17B] NOP ;NOT NEEDED PUSH AX NOP ;NOT NEEDED PUSH BP ;01ED CMP BYTE PTR [017B],80 JNZ K01F7 JMP K0AD5 ;WHITE K01F7: JMP K0ADE ;BLACK RET ;01FA) K01C0 ENDP ;} ;K01FB ;1FB-1EE=C ;RET ;K01FA ;K01FB DW 1410/1450 ;NUMBER/LETTER_BIT_MAP K024B PROC NEAR ;2.0-0 CLEAR_BOARD {( MOV BP,0FFFFH MOV DI,0AH MOV AX,0B800H MOV ES,AX MOV BH,0BFH ;1775d K0258: MOV AX,BP MOV CX,22H ;34d PUSH DI REPZ STOSW POP DI MOV AX,ES XOR AX,200H MOV ES,AX TEST AX,200H JNZ K0270 ADD DI,50H K0270: DEC BH JNZ K0258 RET ;274) K024B ENDP ;} K02DF PROC NEAR ;4.0-0 PRNT_CHAR$ {( MOV SI,K01FB ;CHAR$ START #/LET MOV CL,4 K02E5: PUSH DI MOV CH,1 K02E8: LODSB MOV BH,8 MOV DX,0 K02EE: ROR AL,1 RCR DX,1 SHR DX,1 ;BCKGRND_COLOR=0=BLACK DEC BH JNZ K02EE MOV AX,DX XCHG AL,AH XOR AX,BP STOSW DEC CH JNZ K02E8 POP DI MOV DX,ES XOR DX,200H MOV ES,DX TEST DX,200H JNZ K0315 ADD DI,50H K0315: TEST DX,200H JZ K02E5 DEC CL JNZ K02E5 RET ;31F) K02DF ENDP ;} ;K0320 ;RET ;K0321 ;K0325 DB 0DH,0AH,'BLACK' ;K0331 DB 0DH,0AH,' - ' ;K0338 DB 0DH,0AH.'WHITE' ;K033F DB 0DH,0AH,' - ' ;K0346 DB 0DH,0AH,'$' K0360 PROC NEAR ;7.1 PRINT_VERT_TIME {( PUSH CX PUSH DX MOV CH,AL MOV CL,64H CMP AL,CL JNB K036C MOV CL,0AH K036C: MOV AH,0 MOV AL,CH DIV CL MOV CH,AH PUSH CX MOV BX,0 MOV AH,3 ;GET_CURSOR PG1514 INT 10H ;=>ROW=DH/COL=DL PUSH DX ADD AL,30H MOV AH,2 MOV DL,AL ;PRNT DL INT 21H POP DX INC DH MOV AH,2 INT 10H POP CX MOV AH,0 MOV AL,CL MOV CL,0AH DIV CL MOV CL,AL CMP AL,0 JNZ K036C POP DX POP CX RET ;39D) K0360 ENDP ;} ;K03A0 ;K03A1 K039E PROC NEAR ;8.0-3 PRNT_BRD/CONVERT/KILLS/VERT_TIME {( MOV K0100,0 CALL K0509 ;3A9 8.1-1 PRINT BOARD CALL K1161 ;3AC 8.2-2 CONVERT_BOARD/PRINT_KILL_LABEL CALL K0AA4 ;3AF 8.3-3 PRNT_VERT_TIME CALL K1490 ;NEW 8.4-0 BLACK_TO_START JMP K0420 ;3B2 SAVE_BACK_UP RET ;3B4) K039E ENDP ;} ;K03B5 ;RET ;K03B8 DW DI ;STORE KING POSITION USUALLY ;K03BC DB AL ;'FROM' ;K03BE DW DI ;'FROM' ;K03C0 DW DI ;'TO' ;K03C2 DB AL ;'TO' ;K03C4 DB 'PLAYER (' ;K03CC DB 'B' ;K03CD DB '): PICK UP PIECE USING "DEL" $' ;K03EB DB 'PLAYER ( ;K03F3 DB 'B' ;K03F4 DB '): PLACE CHESSMAN USING "INS" $' ;K0413 DB ' CHECKMATE $' K0420 PROC NEAR ;STORE_'BACK_UP'_BD {( INC K0100 POP BP POP AX PUSH SP MOV CX,27H MOV SI,K0117 K042D: PUSH [SI] INC SI INC SI LOOP K042D PUSH K017B PUSH AX PUSH BP RET ;435) K0420 ENDP ;} ;K0436 ;RET ;K043A K044AP PROC NEAR ;DISPLAY_VERS# {( ;K043B DB ' < VERS 2.5 > $' K044A: CALL K049F ;44A PRNT_LOGO MOV CX,0FFFFH K0450: MOV DX,10H K0453: DEC DX JNZ K0453 LOOP K0450 ;DELAY_LOOP_VERS#_DISPLAY RET ;458) K044AP ENDP ;} ;K0459 ;RET ;K045F ;K0460 DB '>>>>> ILLEGAL MOVE! HIT ENTER. <<<<<<< $ ;K0489 DB 'SAVE.BD',0,'$' ;K0492 DB 'LOAD.BD',0,'$' ;K049B ;K049E K049F PROC NEAR ;6.0-0 PRNT LOGO {( CLD MOV DI,0F2H ;LOGO_SCRN_START MOV AX,0BA00H MOV ES,AX MOV SI,138AH ;LOGO_BIT_MAP_LOCTN MOV CH,12H ;18d_PIX_LINES*2=36d/16d=2.25_CHAR$_LINES K04AD: PUSH DI MOV CL,2 ;2_BYTES_WIDE K04B0: LODSB ;AL=[DSSI] MOV BH,8 MOV DX,0 K04B6: ROR AL,1 ;V->-->^->c RCR DX,1 ;c->--> ->c SHR DX,1 ;0->--> ->c ALT_PIX_COL DEC BH ;BCKGRND_COLOR=0=CYAN JNZ K04B6 MOV AX,DX XCHG AL,AH ;STORED_OPP STOSW ;[ESDI],AX DEC CL JNZ K04B0 POP DI MOV DX,ES XOR DX,200H MOV ES,DX TEST DX,200H JNZ K04DB ADD DI,50H ;80d_COL K04DB: TEST DX,200H JZ K04AD DEC CH JNZ K04AD RET ;4E5) K049F ENDP ;} ;K04E8 507-4E7=20 ;RET ;K0507 K0509 PROC NEAR ;8.1-1 PRINT BOARD {( MOV BX,0 K050C: MOV DI,5DH MOV SI,K0117 MOV DL,[BX+SI] CMP DL,0FFH JZ K0521 MOV AL,BL PUSH BX PUSH DX CALL K0538 ;51C 8.1.1-0 PRINT SQ. POP DX POP BX K0521: INC BX CMP BX,4EH JB K050C RET ;527) K0509 ENDP ;} ;K052D 537-52C=B ;RET ;K0537 K0538 PROC NEAR ;8.1.1-0 PRINT SQ. {((( MOV BP,0 K053B: MOV CX,KBA00 MOV ES,CX CLD MOV AH,0 MOV CL,0AH DIV CL MOV BL,AH ADD AH,AL TEST AH,1 JZ K0555 NOT BP XOR DL,80H K0555: MOV CL,16H MUL CL MOV CL,28H MUL CL ADD DI,AX MOV AL,8 MUL BL ADD DI,AX MOV AL,DL ROL AL,1 AND AL,0FH SUB AL,2 JNS K0596 NOT BP MOV BH,0BH K0573: MOV AX,BP MOV CX,4 REPZ STOSW SUB DI,8 MOV AX,ES XOR AX,200H MOV ES,AX TEST AX,200H JNZ K058C ADD DI,50H K058C: TEST AX,200H JZ K0573 DEC BH JNZ K0573 RET ;595) K0596: MOV CL,58H MUL CL MOV SI,5E6H ;START OF CHESSMEN BIT MAP ADD SI,AX MOV CH,0BH K05A1: PUSH DI MOV CL,4 K05A4: LODSB ;AL,[DSSI] MOV AH,AL ;MOV BL,AL SAME METHOD ADD +00/11 MOV BH,8 ;8_BITS MOV DX,0 ;NOPS K0B52: SHR AL,1 ;0-> --> ->c ;SAR AL,1 ;v-^>--> ->c IF 80 ETC. RETAIN NEG; RCR DX,1 ;c-> --> ->c ;SHR DX,1 ;0-> --> ->c SHR AH,1 ;0-> --> ->c ;SHR DX,1 ;0-> --> ->c RCR DX,1 ;c-> --> ->c ;OR DH,AL ;+ 00 or 11 DEC BH JNZ K0B52 MOV AX,DX XCHG AL,AH XOR AX,BP STOSW DEC CL JNZ K05A4 POP DI MOV AX,ES XOR AX,200H MOV ES,AX TEST AX,200H JNZ K05DA ADD DI,50H K05DA: TEST AX,200H JZ K05A1 DEC CH JNZ K05A1 RET ;5E3) K0538 ENDP ;} ;K05E4 ;RET ;K05E5 ;K05E6-K0A06 MEN_BIT_MAP ;K0A05 A81-A04=7C ;RET ;K0A81 K0A84 PROC NEAR ; PRNT_LABEL {( MOV DL,0 MOV AH,2 INT 10H MOV AH,2 INT 10H ;;K0325 DB D,A,'BLACK',D,A,' - ',D,A.'WHITE',D,A,' - ',D,A,'$' MOV DX,325H MOV AH,9 INT 21H RET ;397) K0A84 ENDP ;} ;K0A98 ;RET ;K0A99 K0A9A PROC NEAR ;7.0-1 RESET_VERT_TIME { MOV AH,2DH MOV CX,0 MOV DX,0 INT 21H K0AA4 PROC NEAR ;8.3-3 PRNT_VERT_TIME {( MOV BX,0 MOV DX,1127H MOV AH,2 ;SET_CURSOR INT 10H MOV AH,2CH ;GET_TIME INT 21H MOV AL,CH ;HRS. CALL K0360 ;AB4 7.1-1PRINT_VERT_TIME =HRS MOV AL,CL ;MIN. CALL K0360 ;AB9 7.2=7.1-1PRINT_VERT_TIME =MIN MOV AL,DH ;SEC. CALL K0360 ;ABE 7.3=7.1-1PRINT_VERT_TIME =SEC RET ;AC1) K0AA4 ENDP ;} K0A9A ENDP ;L} ;K0AC2 ;RET ;K0AC3 K0AE3 PROC NEAR ;???? EXIT {(( MOV AH,7 INT 21H ;;CMP AL,30H ;;JZ K0ACD MOV AX,3 INT 10H MOV AX,4C00H INT 21H RET ;AF5) K0AE3 ENDP ;} ;K0AF6 AFC-AF5=7 ;K0AFC RET K0BBB PROC NEAR ;11.3-1 GET_KEY/HIGHLT_SQ. {(( JMP K0BBB K0AFD: ; DOWN_ARROW ( ADD WORD PTR K03B8,0AH MOV AX,K03B8 SUB AX,SI CMP AX,50H JB K0B11 SUB K03B8,50H ;PUT_AT_TOP K0B11: RET ;B11) K0B12: ;'' LFT_ARR ( DEC K03B8 MOV AX,K03B8 SUB AX,SI MOV CL,0AH DIV CL CMP AH,8 JB K0B29 ADD WORD PTR K03B8,8 ;PUT_AT_RIGHT K0B29: RET ;B29) K0B2A: ;''RGHT_ARR? ( INC K03B8 MOV AX,K03B8 SUB AX,SI MOV CL,0AH DIV CL CMP AH,8 JB K0B41 SUB K03B8,8 ;PUT_AT_LEFT K0B41: RET ;B41) K0B42: ;'' UP_ARR ( SUB K03B8,0AH MOV AX,K03B8 SUB AX,SI JNS K0B53 ADD K03B8,50H ;PUT_AT_BOTTOM K0B53: RET ;B53) K0B54: ;'INS' ( CMP K03BA,2 ;DEL=2 JNZ K0B83 MOV BX,K03B8 MOV AL,[BX] CMP AL,0 JZ K0B6B XOR AL,K017B ;17D K0B69: ;TEST IF KING CHECKMATE JNS K0B83 ;OWN_MAN ;KEYS DEL/INS PLAYER FROM_LOC TO_LOC TO_SQ_OPP ;;[3B8;BX_TOTAL][3BA;1/2][3BC;AL_OLD][3BE;BX_OLD][3C0;BX_NEW][3C2;AL_NEW] K0B6B: MOV K03C0,BX ;NEW_LOCTN. MOV AL,[BX] ;NEW_SQ/OPP'S MOV K03C2,AL MOV AL,K03BC ;PLAYER MOV [BX],AL ;MOVE_IT MOV K03BA,0 ;ERASE_OLD K0B83: RET ;B83) K0B84: ;'DEL' ( CMP K03BA,1 ;PREPARE TO MOVE=1 JNZ K0BAC MOV BX,K03B8 MOV AL,[BX] CMP AL,0 JZ K0BAC ;ERR XOR AL,K017C ;17E JNS K0BAC ;NOT_OWN_MAN ;KEYS DEL/INS PLAYER FROM_LOC TO_LOC TO_SQ_OPP ;;[3B8;BX_TOTAL][3BA;1/2][3BC;AL_OLD][3BE;BX_OLD][3C0;BX_NEW][3C2;AL_NEW] MOV K03BE,BX ;'FROM' MOV AL,[BX] ;'FROM'_MAN MOV K03BC,AL MOV BYTE PTR [BX],0 ;ERASE_OLD_LOC MOV BYTE PTR K03BA,2 ;PREPARE_INS K0BAC: RET ;BAC) K0BAD: CMP AL,47 ;'HOME'=LOAD ANALYZE.COM AND RUN IT - CALL2468 JNZ K0BB4 JMP K14B7 ;K0BB1 K0BB4: CMP AL,51H ;'PgDn'=BACK_UP A MOVE JNZ K0BBB JMP K01C0 ;BB8 11.3.1-0 BACK_UP_BD ) K0BBB: ;<-. ;GET_KEY CALL K0BF9 ;BBB 11.3.2-4 ACTIVATE_NEW_SQ/TIME_VERT/HORZ MOV AH,1 ; INT 16H ; JZ K0BBB;>' MOV AH,8 INT 21H INT 21H MOV SI,K0117 CMP AL,50H JNZ K0BD4 JMP K0AFD ;'' DWN_ARR K0BD4: CMP AL,4BH JNZ K0BDB JMP K0B12 ;'' LFT_ARR K0BDB: CMP AL,4DH JNZ K0BE2 JMP K0B2A ;'' RT_ARR K0BE2: CMP AL,48H JNZ K0BE9 JMP K0B42 ;'' UP_ARR K0BE9: CMP AL,52H JNZ K0BF0 JMP K0B54 ;'INS' K0BF0: CMP AL,53H JNZ K0BF6 JMP K0B84 ;'DEL' K0BF6: JMP K0BAD ;'PgDn'=BACK_UP_BD/ANALYZE ;;;;;;;;;;;;;;;;(14B7 - 14AC RELOCATED HERE IN CALL ROUTINE K14B7: ;(LOAD + RUN ANALYZE.COM PUSH CS PUSH CS POP ES POP DS CALL K14F7 ;K14BB PROVIDE POPDX K14BE DB 'analyze.com',0,0,0,0 ;MUST END WITH 0 K14F0 DB FF FF FF FF FF FF FF K14F7: POP DX MOV AX,3D00 ;OPEN FILE DS:DX,0 INT 21 JNB K1534 ;OPEN OK -> CALL K0C72 ;14FF SET CURSOR AT LINE 25 START ERROR ROUTINE CALL K152A ;K1502 PROVIDE POPDX ERR MSSG K1505 DB 'ANALYZE.COM WAS NOT LOADED:$$' ;MUST END WITH $ POP DX MOV AH,09 ;PRINT DS:DX,$ INT 21 MOV AH,07 ;WAIT FOR ENTER INT 21 RET ;K1533 K1534: PUSH AX POP BX ;HNDL MOV CX,3000 MOV DX,2100 ;NOTE: THIS IS THE LOCTN TO STORE CODE WITH DEBUG IF NEEDED MOV AH,3F ;READ FILE INTO BUFFER DS:DX, CX BYTESM HNDL BX INT 21 MOV AH,3E ;CLOSE FILE HNDL BX INT 21 NOP NOP NOP MOV BYTE PTR [21FB],C3 ;PLACE A RETURN AT 2000+1FB WITH PAUSE MOV BYTE PTR [246D],22 ;STARTING PIECE VALUES 2000+2C7 MOV BYTE PTR [3514],E8 ;JMP 2000+1514 NOT NEEDED BUT MOV BYTE PTR [3515],78 ;DOES GET PRINTED OVER MOV BYTE PTR [3516],02 ;" MOV AH,0F ;GET CURRENT PAGE BH INT 10 MOV AL,BH MOV [14F0],AL ;STORE PAGE MOV AL,03 MOV AH,05 ;SET PAGE AL INT 10 PUSH AX PUSH BX PUSH CX PUSH DX PUSH DS NOP PUSH DI PUSH SI PUSH ES PUSH BP CALL 2468 ;K1579 RUN LOADED ANALYZE.COM 2468-2100=368 MOV AX,0005 ;MODE 5 INT 10 MOV AL,[14F0] ;STORED PAGE MOV AH,05 SET PAGE AL INT 10 CALL 024A ;K1588 CALL 049F ;K158B CALL 028B ;K158E CALL 1185 ;K1591 CALL 15AC ;K1594 POP BP POP ES POP SI POP DI NOP POP DS POP DX POP CX POP BX POP AX RET ;K15A1 RET ;15AC) ;;;;;;;;;;;;;;;;) 14B7-15AC RELOCATED RET ;BF8) K0BBBP ENDP ;} K0BF9 PROC NEAR ;11.3.2-4 ACTIVATE_NEW_SQ/TIME_VERT/HORZ {( MOV CX,2 MOV DX,K03C0 K0BFC: ;<--. MOV SI,K0117 ; MOV DI,5DH ; MOV BX,K03B8 ; MOV DL,[BX] ; ;PLAYER_MAN_NEW_LOCTN CMP K03BA,1 ; ;DELETED JZ K0C13;>-. ; MOV DL,K03BC; ; ;'FROM'_LOCTN K0C13: ;<--' ; XOR DL,80H ; ;ITS_INVERSE SUB BX,SI ; MOV AL,BL ; MOV BP,KFFFF ; PUSH CX ; CALL K053B ;C1E 11.3.1.1=8.1.1-0 PRINT_SQ. CALL K0AA4 ;C21 11.3.1.2=8.3-3 PRNT_VERT_TIME ;VERS2.5 IGNORE CALL K0D5A ;C24 11.3.1.3-2 PRNT_HORZ_TIME POP CX ; LOOP K0BFC ;>--' CALL K0509 ;C2A 11.3.1.4=7.1 PRNT_BRD RET ;C2D) K0BF9 ENDP ;} RET K0C2F PROC NEAR ;11.1-0 ;FIND_KING/STORE/CHECKMATE? {(( CLD PUSH CS POP ES MOV AL,5 OR AL,K017B ;17D MOV CX,50H MOV DI,K0117 ;BD STRT REPNZ SCASB ;CMP[ESDI],AL=5/85 JZ K0C59;>-. ;KING_FOUND K0C42: MOV DX,413H; ;'CHECKMATE $' MOV AH,9 ; ;PRNT MSSG INT 21H ; MOV AX,100H; ;INPUT INT 21H ; MOV AX,3 ; ;TXT SCREEN INT 10H ; MOV AX,4C00H ;RETURN TO DOS INT 21H ; RET ;C58) ; K0C59: ;<-' ;KEYS DEL/INS PLAYER FROM_LOC TO_LOC TO_SQ_OPP ;;[3B8;BX_TOTAL][3BA;1/2][3BC;AL_OLD][3BE;BX_OLD][3C0;BX_NEW][3C2;AL_NEW] DEC DI MOV K03B8,DI ;STORE KING POSITION MOV K03BC,AL ;STORE KING ID MOV K03BE,DI MOV K03C0,DI ;NEW_LOC MOV K03C2,AL ;OPP RET ;C6F) K0C2F ENDP ;} ;K0C70 ;RET K0C72 PROC NEAR ;1.0-0 SET_CURSOR_BOTTOM {( MOV AH,2 ;SET_CURSOR MOV DX,1800H ;COL=0/ROW=24d MOV BX,0 INT 10H RET ;C7C) K0C72 ENDP ;} K0C7E PROC NEAR ;11.0-12 ;PLAY_LOOP (W-1ST/B)/GET_KEY/ACTIVAT_SQ. {(( K0C7E: CALL K0C2F ;C7E 11.1-0 ;FIND_KING/STORE/CHECKMATE? MOV AL,57H ;'W'HITE TEST K017B,80H ;17D JNZ K0C8C;>-. MOV AL,42H ; ;'B'LACK K0C8C: ;<-' MOV K03CC,AL MOV K03F3,AL MOV BYTE PTR K03BA,1 CALL K0C72 ;C97 11.2=1.0-0 ;SET_CURSOR_BOTTOM MOV DX,3C4H ;'PLAYER (B): PICK UP PIECE USING "DEL" $' MOV AH,9 ;PRNT MSSG DSDX INT 21H K0CA1: ;<-. CALL K0BBBP ;CA1 11.3-1 ;GET_KEY/HIGHLT_SQ. TEST K03BA,1 ;'DEL'=1 JNZ K0CA1;>-' CALL K0C72 ;CAB 11.4=1.0-0 SET_CURSOR_BOTTOM MOV DX,3EBH ;'PLAYER (B): PLACE CHESSMAN USING "INS" $' MOV AH,9 ;PRNT MSSG DSDX INT 21H K0CB5: ;<-. CALL K0BBBP ;CB5 11.5=11.3-1 GET_KEY/HIGHLT_SQ. CMP BYTE PTR K03BA,2 ;'INS'=2 JZ K0CB5;>-' CALL K0509 ;CBF 11.6=8.1 ;PRINT BOARD CALL K0E80;CC2 11.7-3 ;TEST_IF_MOVE_LEGAL c=NO +++ JB K0CD3;>-. ;ERROR! CALL K1290 ;CC7 11.8 ;IS_KING_IN_CHECK ; V JB K0CD3;>-* ;ERROR! ; CALL K0FCF ;CCC 11.9-2 ;PRINT_REPLY_LABEL CALL K112B ;CCF 11.10 RET ;CD2) ; ;OK_DONE! K0CD3: ;<-' ;ERROR! CALL K0C72 ;CD3 11.11=1.0-0 ;SET_CURSOR_BOTTOM MOV DX,460H ;'>>>>> ILLEGAL MOVE! HIT ENTER. <<<<<<< $ MOV AH,9 INT 21H MOV AH,7 INT 21H CALL K01C0 ;CE1 ;11.3.1 'BACK_UP'_BD RET ;CE4) K0C7E ENDP ;} ;K0CE9 ;CFB-CE9=12 ;RET ;K0CEB K0CEC PROC NEAR ;DISPLAY_VERS# {(( MOV AH,2 INT 10H MOV DX,43BH MOV AH,9 INT 21H CALL K044A ;)DISPLAY_VERS# RET ;CFA) K0CEC ENDP ;} ;K0CFB ;RET ;K0CFF K0D00 PROC NEAR ;9.0-1 INIT_WHITE/SAVE {( MOV K017B,80H ;WHITE_TURN_CHANGES MOV K017C,0 MOV K017D,80H ;WHITE_TURN_NEVER_CHANGES MOV K017E,0 MOV K017F,0 ;W_EP_ADDRSS_RESET MOV K0183,0 ;EXTRA-SPACE CALL K0F7B ;D18 9.1-0 SAVE_BOARD CALL K0420 ;D1B 9.2-0 STORE_BACK_UP RET ;D1E) K0D00 ENDP ;} K0D1F PROC NEAR ;12.0-0 INIT BLACK_SIDE {( MOV K017B,0 ;BLACK_TURN_CHANGES MOV K017C,80H MOV K017D,0 ;BLACK_TURN_NEVER_CHANGES MOV K017E,80H MOV K0181,0 ;B_EP_ADDRSS_RESET MOV K0183,0 ;EXTRA-SPACE CALL K0F7B ;D37 12.1=9.1-0 SAVE_BOARD CALL K0420 ;D3A 12.2=9.2-0 STORE_BACK_UP RET ;D3D) K0D1F ENDP ;} ;K0D3E ;RET ;K0D3F K0D40 PROC NEAR ;10.0 STORE_TIME_NEG {( MOV AH,2CH ;GET_INIT_TIME_TO_SUBTRACT INT 21H MOV CH,0 NEG CX MOV K0185,CX ;-MIN. MOV CH,0 MOV CL,DH NEG CX MOV K0183,CX ;-SEC. RET ;D56) K0D40 ENDP ;} ;K0D57 ;RET ;K0D59 K0D5A PROC NEAR ;11.3.1.3-2 PRNT_HORZ_TIME {( MOV AH,2CH ;GET_TIME INT 21H MOV CH,0 ADD CX,K0185 ;ADD_MIN_TIME_TO_NEG_INIT_TIME MOV BH,0 MOV BL,DH ADD BX,K0183 ;ADD_SEC_TIME_TO_NEG_INIT_TIME JNS K0D72 ADD BX,3CH ;ADD_60_SEC DEC CX K0D72: CMP CX,63H ;99d=1.5hrs. JB K0D7C SUB CX,63H JMP K0D72 K0D7C: PUSH BX PUSH CX MOV AH,2 MOV DX,1600H ;WHITE_TURN CMP K017B,80H JZ K0D8D MOV DX,1200H ;BLACK_TURN K0D8D: MOV BX,0 INT 10H POP AX CALL K0DA6 ;D93 11.3.1.3.1-0 MARK KILL MOV DL,3AH MOV AH,2 INT 21H POP AX CALL K0DA6 ;D9F 11.3.1.3.2=11.3.1.3.1-0 MARK KILL RET ;DA2) K0D5A ENDP ;} ;K0DA3 ;RET ;K0DA5 K0DA6 PROC NEAR ;11.3.1.3.1-0 MARK KILL {( MOV CH,AL MOV CL,64H CMP AL,CL JNB K0DB0 MOV CL,0AH K0DB0: MOV AL,CH MOV AH,0 DIV CL MOV CH,AH MOV DL,AL ADD DL,30H MOV AH,02 INT 21H MOV AH,0 MOV AL,CL MOV CL,0AH DIV CL MOV CL,AL CMP CL,01 JNB K0DB0 RET ;DD0) K0DA6 ENDP ;} ;K0DD1 DDF-DD0=F ;RET ;K0DDF ;; b r n q k p P B R N Q K',0DH,0AH,'0',0 ;;K0DE0 62,72,6E,71,6B,70,50,42,52,4E,51,4B,0D, 0A, 30,00 ;;K0DF0 01,02,04,06,05,03,83,81,82,84,86,85,FF, FF, 00,00 ;;K0E00 00,01,02,03,04,05,06,07,08,09,0A,0B,0C, 0D, 0E,0F ;;K0E10 04 08 F7 0B 09 F5 00 00-00 00 00 00 00 00 00 00 ;;K0E20 04 08 F6 01 0A FF 00 00-00 00 00 00 00 00 00 00 ;;K0E30 08 01 ED F8 0C 15 13 08-F4 EB 00 00 00 00 00 00 ;;K0E40 08 08 F6 F7 01 0B 0A 09-FF F5 00 00 00 00 00 00 ;;K0E50 0A 01 F6 F7 F5 0B 0A 09-01 FF FE 02 03 02 00 00 ;;K0E60 06 01 FF 01 09 0B 0A 14-F6 00 00 00 00 00 00 00 ;;K0E70 06 01 FF 01 F5 F7 F6 EC-0A 00 8B 0E BE 03 39 0E K0E80 PROC NEAR ;11.7-3 TEST_MOVE_LEGAL {(((((((((((((((( ;KEYS DEL/INS PLAYER FROM_LOC TO_LOC TO_SQ_OPP ;;[3B8;BX_TOTAL][3BA;1/2][3BC;AL_OLD][3BE;BX_OLD][3C0;BX_NEW][3C2;AL_NEW] MOV CX,K03BE ;'FROM'_LOCTN CMP K03B8,CX ;MOVED? JNZ K0E8C STC ;NO:_ILLEGAL_MOVE RET ;E8B) K0E8C: CALL K130D ;E8C ;11.7.1 FIND_JUMP_START_SI/DI MOV CH,[SI] ;DIRECTN_# K0E91: MOV BX,K03BE INC DI MOV DL,[SI+1] ;JUMP_# K0E99: MOV AH,[DI] MOV CL,8 SAR AX,CL ;v=>^ --------> ->c ADD BX,AX ;JUMP_DISTNC CMP BX,K03C0 ;= 'TO'_JUMP_LOCTN? JNZ K0F0B ;NO CMP SI,K0E50 ;KING? JNZ K0ED4 ;NO CMP DI,K0E5A ;CASTLEING? JB K0EBF ;NO CMP K03C2,0 ;'TO'_SQ_EMPTY? JZ K0EBC STC ;ILLEGAL_NOT_EMPTY RET ;EBB) K0EBC: CALL K1079 ;DI=E5A/E5B=-2/+2 11.7.2 CASTLEING? =) JNC K0EBF RET ;JMP)VERS2.6 K0EBF: CMP K017B,80H ;MARK_KING_MOVED JNZ K0ECD OR K0188,10H ;W_KING JMP K0ED2 K0ECD: OR K0188,1 ;B_KING K0ED2: CLC RET ;ED3) K0ED4: ;NOT_KING CMP SI,K0E60 ;PAWN? JB K0F20 ;CHECK_CASTLE PUSH DI POP AX AND AL,0FH CMP AL,4 JNB K0EE5 CALL K1000 ;AL=2/3=-1/+1 11.7.2) RET ;JUMP) K0EE5: CMP K03C2,0 ;EMPTY SQ. JZ K0EF2 CMP AL,6 JB K0EFA ;CHECK_PAWN_PROMOTN K0EF0: STC ;ILLEGAL_MOVE RET ;EF1) K0EF2: ;EMPTY_SQ. CMP AL,6 JB K0EF0 ;ERROR JZ K0EFA ;CHECK_PAWN_PROMOTN JMP K0F4B ;EP_MOVE K0EFA: CMP BX,K0121 ;PAWN_PROMTN? JB K0F08 CMP BX,K015D JNB K0F08 CLC RET ;F07) K0F08: CALL K11F4 ;AL=4/5/6 PAWN_PROMTN 11.7.3) RET ;JMP) K0F0B: ;TRY_AGAIN CMP BYTE PTR [BX],0 ;EMPTY? JNZ K0F14 DEC DL JNZ K0F1A ;NEXT_JMP K0F14: DEC CH JNZ K0F1D ;NEXT_DIRCTN K0F18: STC ;ERROR RET ;F19) K0F1A: JMP K0E99 K0F1D: JMP K0E91 K0F20: ;CASTLE_MOVED? CMP SI,K0E20 JNZ K0F43 MOV AX,K03BE ;HOME_SQ. SUB AX,K0110 MOV CL,7 DIV CL CMP AH,0 JNZ K0F43 CMP AL,11H JB K0F45 AND AL,0FH SHL AL,1 SHL AL,1 K0F3F: ;CORNER_SQ_1/2/3/4 OR K0189,AL ;MARK_CASTLE_MOVED K0F43: CLC RET ;F44) K0F45: CMP AL,3 JB K0F3F CLC RET ;F4A) K0F4B: CALL K103D ;F4B 11.7.4-0 TEST_EP_MOVE PUSH BX MOV CL,8 MOV AH,[DI+1] ;PREVIOUS_SQ SAR AX,CL ADD BX,AX MOV AL,[BX] POP BX CMP AL,0 ;EMPTY? JZ K0F61 JMP K0F74 K0F61: CMP K017B,80H ;MARK_EP_MOVE JNZ K0F6E MOV K017F,BX ;W_EP JMP K0F72 K0F6E: MOV K0181,BX ;B_EP K0F72: CLC RET ;F73) K0F74: STC ;NOT_EP_MOVE RET ;F75) K0E80 ENDP ;} ;K0F76 ;RET ;K0F7A K0F7B PROC NEAR ; 9.1-0 SAVE_BOARD {( PUSH CS POP DS MOV AX,3D01H ;OPEN_FILE DSDX WRITE_ONLY => HNDL_# MOV DX,489H ;'SAVE.BD',0,'$' INT 21H PUSH AX POP BX ;HNDL_# MOV CX,0A0H MOV DX,K0117 MOV AH,40H ;WRITE 160_BYTES INT 21H MOV AH,3EH ;CLOSE FILE INT 21H RET ;F95) K0F7B ENDP ;} ;K0F96 F9F-F95=A ;RET ; ;K0F9F K0FA0 PROC NEAR ;11.12 RESTORE_BOARD {( PUSH CS POP DS LEA DX,K0489 ;'SAVE.BD',0,'$' MOV AX,3D10H ;OPEN_R_DSDX=>FILE_HNDL=>AX INT 21H PUSH AX ;FILE_HNDL# POP BX MOV CX,0A0H MOV DX,K0117 MOV AH,3FH ;READ_CX-BYTES_FILE_HNDLE=BX INT 21H MOV AH,3EH ;CLOSE_FILE_HNDL=BX INT 21H RET ;FBA) K0FA0 ENDP ;} ;K0FBB ;RET ;K0FBD K0FBE PROC NEAR ;11.9.1-FIND_ROW/COL_OF_OFFSET {(( MOV SI,K0117 SUB AX,SI MOV CL,0AH DIV CL NEG AL ADD AL,38H ADD AH,41H XCHG AL,AH RET ;FCE) K0FBE ENDP ;} K0FCF PROC NEAR ;11.9-2 PRINT_REPLY_LABEL {(( CMP K017B,80H JNZ K0FDB MOV DX,1500H JMP K0FDE K0FDB: MOV DX,1100H K0FDE: MOV BX,0 MOV AH,2 INT 10H MOV AX,K03BE CALL K0FBE ;FE8 11.9.1-FIND_ROW/COL_OF_OFFSET MOV K0341,AX MOV AX,K03C0 CALL K0FBE ;FF1 11.9.1-FIND_ROW/COL_OF_OFFSET MOV K0344,AX LEA DX,K0341 ;' - ',0DH,0AH,'$' MOV AH,9 ;PRNT REPLY INT 21H RET ;FFE) K0FCF ENDP ;} ;K0FFF ;RET K1000 PROC NEAR ;11.7.2-1 EPx {(( CMP BX,K0135 JB K1021 ;ILLEGAL_MOVE CMP BX,K0149 JNB K1021 ;ILLEGAL_MOVE CMP K017B,80H JNZ K101B CMP BX,K013F JNB K1021 JMP K1023 K101B: CMP BX,K013F JNB K1023 K1021: STC RET ;1022) K1023: MOV BYTE PTR [BX],0 MOV AH,[SI+6] MOV CL,8 SAR AX,CL ;v-^>--> ->c IF 80 ETC. RETAIN NEG ADD BX,AX MOV AL,K03BC MOV [BX],AL MOV K03C0,BX ;;;;CALL K0509 ;1038 11.7.2.1= ???ERR5 CLC RET ;103C) K1000 ENDP ;} K103D PROC NEAR ;11.7.4-0 TEST_EP_MOVE {( CMP BX,K0135 JB K105E ;ILLEGAL_MOVE CMP BX,K0149 JNB K105E ;ILLEGAL_MOVE CMP K017B,80H JNZ K1058 CMP BX,K013F JB K105E ;ILLEGAL_MOVE K1056: CLC ;OK_EP RET ;1057) K1058: CMP BX,K013F JB K1056 K105E: ;ILLEGAL_MOVE STC POP AX ;???ERR3 RET ;1060) K103D ENDP ;} ;K1061 ;RET K1062 PROC NEAR ;11.7.1.1.1.2-0 RESTORE_TO/FROM_LOCTN {( POP AX MOV CX,6 LEA DI,K03C2 STD ;DEC K106A: POP BX MOV [DI],BX SCASW ;CMP[ESDI],AL NOP LOOP K106A PUSH AX RET ;1072) K1062 ENDP ;} ;K1073 1078-1072=6 ;RET ;K1078 K1079 PROC NEAR ;11.7.2 -1 CASTLEING? {((( CMP K017B,80H JNZ K1089 CMP K0188,10H JNZ K1090 K1087: STC RET ;1088) K1089: CMP K0188,1 JZ K1087 K1090: ; 0 1 2 3 4 5 6 7 8 9 A B C D E F ;;K0E50 0A 01 F6 F7 F5 0B 0A 09 01 FF FE 02 03 02 00 00 ; ;+1 -1;-2 +2; MOV BYTE PTR [BX],0 ;HIDE_KING PUSH CS POP ES MOV CH,[DI-2] MOV CL,8 SAR CX,CL ;v-^> -------> ->c IF 80 ETC. RETAIN NEG ADD BX,CX PUSH BX CLD CMP CX,0 JS K10A6 STD K10A6: MOV CL,[DI+2] MOV CH,0 PUSH BX POP DI MOV AL,0 REPZ SCASB JZ K10B6 K10B3: POP AX STC RET ;10B5) K10B6: MOV AL,[DI] AND AL,0FH CMP AL,2 JNZ K10B3 PUSH DI CALL K1243 ;10BF)**CAL 11.7.1.1 RET ;JUMP) K1079 ENDP ;} ;K10C2 10E3-10C1=12 ;RET ;K10C3 K10C4 PROC NEAR ;3.0-0 LOAD_BOARD/CONVERT {( CLD PUSH CS POP DS LEA DX,K0492 ;K0492 DB 'LOAD.BD',0,'$' MOV AX,3D10H ;OPEN FILE INTO HNDLE =>AX=>BX INT 21H PUSH AX POP BX MOV CX,63H ;80d+16d+3 MOV DX,K0117 MOV AH,3FH ;READ CX BYTES FILE HNDL BX INTO DS:DX INT 21H MOV AH,3EH ;CLOSE FILE HNDL BX INT 21H CLD MOV BX,63H ;80d+16d+3 PUSH CS POP ES PUSH CS POP DS MOV SI,K0116 K10EA: ;;CONVERSION_LIST ;; b r n q k p P B R N Q K',0DH,0AH,'0',0 ;;K0DE0 62,72,6E,71,6B,70,50,42,52,4E,51,4B,0D, 0A, 30,00 ;;K0DF0 01,02,04,06,05,03,83,81,82,84,86,85,FF, FF, 00,00 INC SI MOV CX,10H LEA DI,K0DE0 MOV AL,[SI] REPNZ SCASB ;CMP[ESDI],AL JZ K10F9 JMP K1100 K10F9: ;<=FOUND_CHAR$ ADD DI,0FH ;CONVERT LOADED BOARD MOV AL,[DI] MOV [SI],AL K1100: ;NO_SUCH_CHAR$ DEC BX JNZ K10EA JMP K1113 ;1103 ;K1105 DB FF FF FF-FF FF FF FF FF FF FF FF FF FF '$' K1113: MOV BX,0 MOV DX,1010H PUSH DX MOV AH,2 ;SET_CURSOR INT 10H MOV DX,1105H ;FF,FF,FF,FF,FF,FF,FF,FF,FF,FF,FF,FF,FF,'$' MOV AH,9 ;PRNT MSSG INT 21H POP DX CALL K0CEC ;)DISPLAY_VERS# RET ;1129) K10C4 ENDP ;} ;K112A K112B PROC NEAR ;11.10-MARK KILL {((( PUSH CS POP ES LEA DI,K0DF0 MOV AL,K03C2 ;KILLED OPP MOV CX,0DH CLD REPNZ SCASB ;LOCTN JZ K113C RET ;113B) K113C: SUB DI,11H MOV AL,[DI] ;LETTER PUSH SI LEA SI,K0A5B PUSH SI POP DI POP SI MOV CX,21H CLD REPNZ SCASB JZ K114D RET ;114C) K114D: DEC DI CMP K017B,80H JNZ K115A MOV BYTE PTR [DI],23 ;MARK KILL JMP K115D K115A: MOV BYTE PTR [DI],23 K115D: CALL K1185 ;115D CALPOP 8.2.1 RET ;JMP) K112B ENDP ;} ;K115F ;RET ;K1160 K1161 PROC NEAR ;8.2-2 CONVERT_BOARD/PRINT_KILL_LABEL {( ;K0A3A DB PPPPPPPPRRNNBBQK ;K0A4A DB pppppppprrnnbbqk ;K0A5B DB PPPPPPPPRRNNBBQK ;K0A6B DB pppppppp#rnnbbqk ;BLACK ROOK KILLED PUSH CS POP ES LEA SI,K0A3A PUSH SI LEA SI,K0A5B PUSH SI POP DI POP SI MOV CX,20H CLD REPZ MOVSB ;[ESSI],DSSI COPY CHANGES OVER -KILLED BLACK ROOK CALL K1185 ;116F CALPOP 8.2.1 RET ;JMP) K1161 ENDP ;} K1171P PROC NEAR ;8.2.1 SET COL PRNT VERT DESTROYED MEN (( K1171: MOV AH,2 ;SET CURSOR MOV BH,0 PUSH DX ;DH_ROW DL_COL INT 10H MOV DL,[SI] MOV AH,2 ;PRNT DL INT 21H POP DX INC DH INC SI LOOP K1171 ;16_VERT_MEN RET ;1184) K1171P ENDP ;) K1185 PROC NEAR ;8.2.1 {( LEA SI,K0A5B MOV DX,4 ;COL_4 MOV CX,10H ;16_VERT_MEN CALL K1171P ;118E 8.2.1 SET COL PRNT VERT DESTROYED MEN MOV DX,27H ;LAST_COL MOV CX,10H ;16_VERT_MEN CALL K1171P ;1197 8.2.2=8.2.1 SET COL PRNT VERT DESTROYED MEN MOV DL,0 MOV AH,2 ;SET_CURSOR SAME ROW INT 10H MOV AH,2 INT 10H ;;K0325 DB D,A,'BLACK',D,A,' - ',D,A.'WHITE',D,A,' - ',D,A,'$' LEA DX,K0325 MOV AH,9 ;PRNT MSSG INT 21H RET ;11AD) K1185 ENDP ;} ;11AD 11F3-11AC=47 ;RET ;11F3 K11F4 PROC NEAR ;11.7.4-2 {( PUSH BX CALL K0C72 ;11F5 11.7.4.1 POP BX ;K11BF DB 'PAWN PROMOTION: , R, N or B ? $' LEA DX,K11BF MOV AH,9 INT 21H K1200: MOV AH,1 INT 16H JZ K1200 MOV AH,8 INT 21H INT 21H CMP AL,60H JB K1212 SUB AL,20H K1212: CMP AL,52H JNZ K121A MOV AL,2 JMP K122C K121A: CMP AL,42H JNZ K1222 MOV AL,1 JMP K122C K1222: CMP AL,4EH JNZ K122A MOV AL,4 JMP K122C K122A: MOV AL,6 K122C: CMP K017B,80H JNZ K1235 OR AL,80H K1235: MOV [BX],AL MOV K03BC,AL CALL K0509 ;123A 11.7.4.2 POP AX CLC RET ;123F) K11F4 ENDP ;} ;K1240 ;RET ;K1242 K1243 PROC NEAR ;11.7.1.1-2 {(( ;NOPS MOV CX,3 MOV DI,K03BE K1251: PUSH CX PUSH DI PUSHF PUSH DI POP BX MOV AL,K03BC CALL K12AA ;1259 11.7.1.1.1 JNB K1265 POP AX POP AX POP AX POP AX POP AX STC RET ;1264) K1265: POPF POP DI SCASB POP CX LOOP K1251 MOV AL,0 POP DI MOV AH,[DI] MOV [DI],AL MOV BX,K03BE MOV [BX],AL POP BX MOV [BX],AH MOV AL,K03BC MOV BX,K03C0 MOV [BX],AL CALL K0509 ;1284 11.7.1.1.2= NOP NOP NOP NOP CLC RET ;128C) K1243 ENDP ;} ;K128D ;RET ;K128F K1290 PROC NEAR ;11.8-1 FIND_KING {((( PUSH CS POP ES MOV AL,5 OR AL,K017B ;17D MOV CX,50H MOV DI,K0117 REPNZ SCASB JZ K12A5 CALL K0C42 ;12A2 CALPOP 11.8.1 =>>RET TO DOS) RET ;JMP) K12A5: DEC DI ;NOPS CALL K12AA ;NEW 11.7.1.1.1 RET ;JUMP) K1290 ENDP ;} K12AA PROC NEAR ;11.7.1.1.1-2 LEGAL_MOVE {(( ;NOPS PUSH DI POP SI MOV CX,6 MOV DI,K03B8 CLD K12B8: MOV BX,[DI] PUSH BX SCASW NOP LOOP K12B8 NOP MOV K03C0,SI MOV K03C2,AL MOV BX,K0117 MOV CX,4EH K12CD: MOV AL,[BX] CMP AL,0 JZ K12F2 CMP AL,0FFH JZ K12F2 MOV AH,AL XOR AL,K017B ;17D JNS K12F2 MOV K03BE,BX MOV K03BC,AH PUSH BX PUSH CX CALL K1335 ;12E9 11.7.1.1.1.1-1 FIND_MAN'S_ID/LEGAL_MOVE? c=NO POP CX POP BX JB K12FA NOP NOP K12F2: INC BX LOOP K12CD CALL K1062 ;12F5 11.7.1.1.1.2-0 RESTORE_TO/FROM_LOCTN CLC RET ;12F9) K12FA: CALL K1062 ;12FA 11.7.1.1.1.2-0 RESTORE_TO/FROM_LOCTN STC RET ;12FE) K12AA ENDP ;} ;K12FF 130C-12FE=E ;RET ;; ;K130C K130D PROC NEAR ;11.7.1 FIND_JUMP_START_SI/DI {(** MOV AL,K03BC K01310: CMP AL,83H JZ K1316 AND AL,0FH K1316: MOV CX,7 CLD PUSH CS POP ES PUSH SI LEA SI,K0DF0 PUSH SI POP DI POP SI ;; b r n q k p P B R N Q K',0DH,0AH,'0',0 ;;K0DE0 62,72,6E,71,6B,70,50,42,52,4E,51,4B,0D, 0A, 30,00 ;;K0DF0 01,02,04,06,05,03,83,81,82,84,86,85,FF, FF, 00,00 ;;K0E00 00,01,02,03,04,05,06,07,08,09,0A,0B,0C, 0D, 0E,0F REPNZ SCASB PUSH DI POP SI ADD SI,0FH MOV AL,[SI] MOV CL,10H MUL CL MOV SI,K0E10P ;; 0 1 2 3 4 5 6 7 8 9 A B C D E F ;;K0E10 04 08 F7 0B 09 F5 00 00-00 00 00 00 00 00 00 00 ;;K0E20 04 08 F6 01 0A FF 00 00-00 00 00 00 00 00 00 00 ;;K0E30 08 01 ED F8 0C 15 13 08-F4 EB 00 00 00 00 00 00 ;;K0E40 08 08 F6 F7 01 0B 0A 09-FF F5 00 00 00 00 00 00 ;;K0E50 0A 01 F6 F7 F5 0B 0A 09-01 FF FE 02 03 02 00 00 ;;K0E60 06 01 FF 01 09 0B 0A 14-F6 00 00 00 00 00 00 00 ;;K0E70 06 01 FF 01 F5 F7 F6 EC-0A 00 8B 0E BE 03 39 0E ADD SI,AX PUSH SI POP DI INC DI ;=>SI=DIRECTN DI=JMPS DI+1=JMP_LIST_START RET ;1334) K130D ENDP ;} K1335 PROC NEAR ;11.7.1.1.1.1-1 FIND_MAN'S_ID/LEGAL_JMP? c=NO {(( CALL K130D ;1335 11.7.1 FIND_JUMP_START_SI/DI MOV CH,[SI] K133A: MOV BX,K03BE INC DI MOV DL,[SI+1] K1342: MOV AH,[DI] MOV CL,8 SAR AX,CL ;v=^> --> ->c IF 80 ETC. RETAIN NEG AX ADD BX,AX CMP BX,K03C0 JNZ K137B CMP SI,K0E50 JNZ K1360 CMP DI,K0E5A JNB K135E K135C: STC RET ;135D) K135E: CLC RET ;135F) K1360: CMP SI,K0E60 JB K135C PUSH DI POP AX AND AL,0FH CMP AL,4 JNB K1370 JMP K135E K1370: CMP AL,6 JB K135C CLC RET ;1375) ;NOPS K137B: CMP BYTE PTR [BX],0 JNZ K1384 DEC DL JNZ K1342 K1384: DEC CH JNZ K133A CLC RET ;1389) K1335 ENDP ;} K1490 PROC NEAR ;8.4-0 LOAD_BD_WHITE/BLACK_TO_START {(( POP DX POP BX ;STORE RETURNS CALL K0420 ;K01492 12.2=9.2-0 STORE_BACK_UP_BD CALL K0420 ;K01495 12.2=9.2-0 STORE_BACK_UP_BD CALL K0420 ;K01498 12.2=9.2-0 STORE_BACK_UP_BD CALL K0420 ;K0149B 12.2=9.2-0 STORE_BACK_UP_BD ; BE SURE TO HAVE LAST BOARD PUSH BX PUSH DX ;RESTORE RETURNS PUSH CS POP DS MOV SI,5DH MOV AL,[SI] CMP AL,42H JZ K14AC RET ;149B) K14AC: MOV WORD PTR K0ACD,09EB RET ;14B2) K1490 ENDP } ;;CS:2100 ;NOTE: THIS IS THE LOCTN TO STORE CODE WITH DEBUG IF NEEDED MYCODE ENDS ;} MYDATA SEGMENT BYTE PUBLIC 'DATA' ;{ ;-----------------------MEN DEFINITION SOLID & OUTLINE ( ;BISHOP 1 ;22d LINES & 4 WIDE & 88d BYTES K05E6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 0FFH,0FBH,09FH,0FFH ;**** **** **** *.** *..* **** **** **** 2 DB 0FFH,0F3H,04FH,0FFH ;**** **** **** ..** .*.. **** **** **** 3 DB 0FFH,0E3H,027H,0FFH ;**** **** ***. ..** ..*. .*** **** **** 4 DB 0FFH,0E2H,027H,0FFH ;**** **** ***. ..*. ..*. .*** **** **** 5 DB 0FFH,0C1H,043H,0FFH ;**** **** **.. ...* .*.. ..** **** **** 6 DB 0FFH,0C8H,093H,0FFH ;**** **** **.. *... *..* ..** **** **** 7 DB 0FFH,0DCH,0BBH,0FFH ;**** **** **.* **.. *.** *.** **** **** 8 DB 0FFH,0C8H,093H,0FFH ;**** **** **.. *... *..* ..** **** **** 9 DB 0FFH,0C8H,013H,0FFH ;**** **** **.. *... ...* ..** **** **** 0 DB 0FFH,0C8H,013H,0FFH ;**** **** **.. *... ...* ..** **** **** 1 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 2 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 3 DB 0FFH,0EFH,0F7H,0FFH ;**** **** ***. **** **** .*** **** **** 4 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 5 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K063E DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FBH,09FH,0FFH ;**** **** **** *.** *..* **** **** **** 1 DB 0FFH,0F5H,06FH,0FFH ;**** **** **** .*.* .**. **** **** **** 2 DB 0FFH,0ECH,0B7H,0FFH ;**** **** ***. **.. *.** .*** **** **** 3 DB 0FFH,0DCH,0DBH,0FFH ;**** **** **.* **.. **.* *.** **** **** 4 DB 0FFH,0DDH,0DBH,0FFH ;**** **** **.* **.* **.* *.** **** **** 5 DB 0FFH,0BEH,0BDH,0FFH ;**** **** *.** ***. *.** **.* **** **** 6 DB 0FFH,0B7H,06DH,0FFH ;**** **** *.** .*** .**. **.* **** **** 7 DB 0FFH,0A3H,045H,0FFH ;**** **** *.*. ..** .*.. .*.* **** **** 8 DB 0FFH,0B7H,06DH,0FFH ;**** **** *.** .*** .**. **.* **** **** 9 DB 0FFH,0B7H,0EDH,0FFH ;**** **** *.** .*** ***. **.* **** **** 0 DB 0FFH,0B7H,0EDH,0FFH ;**** **** *.** .*** ***. **.* **** **** 1 DB 0FFH,09FH,0F9H,0FFH ;**** **** *..* **** **** *..* **** **** 2 DB 0FFH,0DFH,0FBH,0FFH ;**** **** **.* **** **** *.** **** **** 3 DB 0FFH,0C0H,003H,0FFH ;**** **** **.. .... .... ..** **** **** 4 DB 0FFH,0DFH,0FBH,0FFH ;**** **** **.* **** **** *.** **** **** 5 DB 0FFH,0C0H,003H,0FFH ;**** **** **.. .... .... ..** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K0696 ;ROOK 2 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 08CH,063H,08CH,063H ;*... **.. .**. ..** *... **.. .**. ..** 2 DB 08CH,063H,08CH,063H ;*... **.. .**. ..** *... **.. .**. ..** 3 DB 080H,003H,080H,003H ;*... .... .... ..** *... .... .... ..** 4 DB 0DFH,0F7H,0DFH,0F7H ;**.* **** **** .*** **.* **** **** .*** 5 DB 0E0H,00FH,0E0H,00FH ;***. .... .... **** ***. .... .... **** 6 DB 0F0H,01FH,0F0H,02BH ;**** .... ...* **** **** .... ..*. *.** 7 DB 0F3H,09FH,0F3H,033H ;**** ..** *..* **** **** ..** ..** ..** 8 DB 0F3H,08CH,063H,027H ;**** ..** *... **.. .**. ..** ..*. .*** 9 DB 0F3H,08CH,063H,00FH ;**** ..** *... **.. .**. ..** .... **** 0 DB 0F0H,000H,000H,01FH ;**** .... .... .... .... .... ...* **** 1 DB 0B0H,000H,000H,039H ;*.** .... .... .... .... .... ..** *..* 2 DB 0B0H,000H,000H,03BH ;*.** .... .... .... .... .... ..** *.** 3 DB 0BFH,0FFH,0FFH,0FBH ;*.** **** **** **** **** **** **** *.** 4 DB 080H,000H,000H,003H ;*... .... .... .... .... .... .... ..** 5 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K06EE DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 000H,000H,000H,001H ;.... .... .... .... .... .... .... ...* 1 DB 073H,09CH,073H,09DH ;.*** ..** *..* **.. .*** ..** *..* **.* 2 DB 073H,09CH,073H,09DH ;.*** ..** *..* **.. .*** ..** *..* **.* 3 DB 07FH,0FCH,07FH,0FDH ;.*** **** **** **.. .*** **** **** **.* 4 DB 020H,008H,020H,009H ;..*. .... .... *... ..*. .... .... *..* 5 DB 09FH,0F0H,01FH,0F1H ;*..* **** **** .... ...* **** **** ...* 6 DB 0CFH,0E0H,00FH,0E1H ;**.. **** ***. .... .... **** ***. ...* 7 DB 0ECH,060H,00CH,0D5H ;***. **.. .**. .... .... **.. **.* .*.* 8 DB 0ECH,073H,09CH,0CBH ;***. **.. .*** ..** *..* **.. **.. *.** 9 DB 0ECH,073H,09CH,0D7H ;***. **.. .*** ..** *..* **.. **.* .*** 0 DB 00FH,0FFH,0FFH,0E0H ;.... **** **** **** **** **** ***. .... 1 DB 04FH,0FFH,0FFH,0C6H ;.*.. **** **** **** **** **** **.. .**. 2 DB 04FH,0FFH,0FFH,0C5H ;.*.. **** **** **** **** **** **.. .*.* 3 DB 040H,000H,000H,005H ;.*.. .... .... .... .... .... .... .*.* 4 DB 07FH,0FFH,0FFH,0FDH ;.*** **** **** **** **** **** **** **.* 5 DB 000H,000H,000H,001H ;.... .... .... .... .... .... .... ...* 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K0746 ;PAWN 3 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. .*** **** **** **** 2 DB 0FFH,0FCH,03FH,0FFH ;**** **** **** **.. ..** **** **** **** 3 DB 0FFH,0FCH,03FH,0FFH ;**** **** **** **.. ..** **** **** **** 4 DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. .*** **** **** **** 5 DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. ,*** **** **** **** 6 DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. .*** **** **** **** 7 DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. .*** **** **** **** 8 DB 0FFH,0FCH,03FH,0FFH ;**** **** **** **.. ..** **** **** **** 9 DB 0FFH,0FCH,03FH,0FFH ;**** **** **** **.. ..** **** **** **** 0 DB 0FFH,0F8H,01FH,0FFH ;**** **** **** *... ...* **** **** **** 1 DB 0FFH,0F7H,0EFH,0FFH ;**** **** **** .*** ***. **** **** **** 2 DB 0FFH,0F0H,00FH,0FFH ;**** **** **** .... .... **** **** **** 3 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 4 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K079E DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FEH,07FH,0FFH ;**** **** **** ***. .*** **** **** **** 1 DB 0FFH,0FDH,0BFH,0FFH ;**** **** **** **.* *.** **** **** **** 2 DB 0FFH,0FBH,0DFH,0FFH ;**** **** **** *.** **.* **** **** **** 3 DB 0FFH,0FBH,0DFH,0FFH ;**** **** **** *.** **.* **** **** **** 4 DB 0FFH,0FDH,0BFH,0FFH ;**** **** **** **.* *.** **** **** **** 5 DB 0FFH,0FDH,0BFH,0FFH ;**** **** **** **.* *.** **** **** **** 6 DB 0FFH,0FDH,0BFH,0FFH ;**** **** **** **.* *.** **** **** **** 7 DB 0FFH,0FDH,0BFH,0FFH ;**** **** **** **.* *.** **** **** **** 8 DB 0FFH,0FBH,0DFH,0FFH ;**** **** **** *.** **.* **** **** **** 9 DB 0FFH,0FBH,0DFH,0FFH ;**** **** **** *.** **.* **** **** **** 0 DB 0FFH,0F7H,0EFH,0FFH ;**** **** **** .*** ***. **** **** **** 1 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 2 DB 0FFH,0EFH,0F7H,0FFH ;**** **** ***. **** **** .*** **** **** 3 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 4 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K07F6 ;NIGHT 4 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 0FFH,0FBH,0FFH,0FFH ;**** **** **** *.** **** **** **** **** 2 DB 0FFH,0F9H,0FFH,0FFH ;**** **** **** *..* **** **** **** **** 3 DB 0FFH,0F0H,07FH,0FFH ;**** **** **** .... .*** **** **** **** 4 DB 0FFH,0E0H,01FH,0FFH ;**** **** ***. .... ...* **** **** **** 5 DB 0FFH,0CCH,00FH,0FFH ;**** **** **.. **.. .... **** **** **** 6 DB 0FFH,0C0H,007H,0FFH ;**** **** **.. .... .... .*** **** **** 7 DB 0FFH,080H,007H,0FFH ;**** **** *... .... .... .*** **** **** 8 DB 0FFH,002H,007H,0FFH ;**** **** .... ..*. .... .*** **** **** 9 DB 0FFH,00CH,007H,0FFH ;**** **** .... **.. .... .*** **** **** 0 DB 0FFH,018H,007H,0FFH ;**** **** ...* *... .... .*** **** **** 1 DB 0FFH,0D8H,007H,0FFH ;**** **** **.* *... .... .*** **** **** 2 DB 0FFH,0F0H,00FH,0FFH ;**** **** **** .... .... **** **** **** 3 DB 0FFH,0F7H,0EFH,0FFH ;**** **** **** .*** ***. **** **** **** 4 DB 0FFH,0F0H,00FH,0FFH ;**** **** **** .... .... **** **** **** 5 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K084E DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0F1H,0FFH,0FFH ;**** **** **** ...* **** **** **** **** 1 DB 0FFH,0F4H,0FFH,0FFH ;**** **** **** .*.. **** **** **** **** 2 DB 0FFH,0F9H,07FH,0FFH ;**** **** **** .**. .*** **** **** **** 3 DB 0FFH,0EFH,09FH,0FFH ;**** **** ***. **** *..* **** **** **** 4 DB 0FFH,0DFH,0E7H,0FFH ;**** **** **.* **** ***. .*** **** **** 5 DB 0FFH,0B3H,0FBH,0FFH ;**** **** *.** ..** **** *.** **** **** 6 DB 0FFH,03FH,0FBH,0FFH ;**** **** ..** **** **** *.** **** **** 7 DB 0FFH,07FH,0FBH,0FFH ;**** **** .*** **** **** *.** **** **** 8 DB 0FEH,0FDH,0FBH,0FFH ;**** ***. **** **.* **** *.** **** **** 9 DB 0FEH,0F3H,0FBH,0FFH ;**** ***. **** ..** **** *.** **** **** 0 DB 0FEH,0E7H,0FBH,0FFH ;**** ***. ***. .*** **** *.** **** **** 1 DB 0FFH,027H,0F3H,0FFH ;**** **** ..*. .*** **** ..** **** **** 2 DB 0FFH,08FH,0F7H,0FFH ;**** **** *... **** **** .*** **** **** 3 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 4 DB 0FFH,0EFH,0F7H,0FFH ;**** **** ***. **** **** .*** **** **** 5 DB 0FFH,0E0H,007H,0FFH ;**** **** ***. .... .... .*** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K08A6 ;KING 5 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 0FFH,0FDH,07FH,0FFH ;**** **** **** **.* .*** **** **** **** 2 DB 0FFH,0F9H,03FH,0FFH ;**** **** **** *..* ..** **** **** **** 3 DB 0FCH,071H,01CH,07FH ;**** **.. .*** ...* ...* **.. .*** **** 4 DB 0F8H,03FH,0F8H,03FH ;**** *... ..** **** **** *... ..** **** 5 DB 0F1H,011H,011H,01FH ;**** ...* ...* ...* ...* ...* ...* **** 6 DB 0F3H,089H,023H,09FH ;**** ..** *... *..* ..*. ..** *..* **** 7 DB 0F1H,001H,001H,01FH ;**** ...* .... ...* .... ...* ...* **** 8 DB 0F8H,000H,000H,03FH ;**** *... .... .... .... .... ..** **** 9 DB 0FEH,0FFH,0FEH,0FFH ;**** ***. **** **** **** ***. **** **** 0 DB 0FEH,010H,010H,0FFH ;**** ***. ...* .... ...* .... **** **** 1 DB 0FEH,0D7H,0D6H,0FFH ;**** ***. **.* .*** **.* .**. **** **** 2K DB 0FEH,010H,010H,0FFH ;**** ***. ...* .... ...* .... **** **** 3 DB 0FEH,0FFH,0FEH,0FFH ;**** ***. **** **** **** ***. **** **** 4K DB 0FEH,000H,000H,0FFH ;**** ***. .... .... .... .... **** **** 5 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K08FE DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FCH,07FH,0FFH ;**** **** **** **.. .*** **** **** **** 1 DB 0FFH,0FAH,0BFH,0FFH ;**** **** **** *.*. *.** **** **** **** 2 DB 0F8H,076H,0DCH,03FH ;**** *... .*** .**. **.* **.. ..** **** 3 DB 0F3H,0AEH,0EBH,09FH ;**** ..** *.*. ***. ***. *.** *..* **** 4 DB 0F7H,0C0H,007H,0DFH ;**** .*** **.. .... .... .*** **.* **** 5 DB 0EEH,0EEH,0EEH,0EFH ;***. ***. ***. ***. ***. ***. ***. **** 6 DB 0ECH,076H,0DCH,06FH ;***. **.. .*** .**. **.* **.. .**. **** 7 DB 0EEH,0FEH,0FEH,0EFH ;***. ***. **** ***. **** ***. ***. **** 8 DB 0F7H,0FFH,0FFH,0DFH ;**** .*** **** **** **** **** **.* **** 9 DB 0F8H,000H,000H,03FH ;**** *... .... .... .... .... ..** **** 0 DB 0FDH,0EFH,0EFH,07FH ;**** **.* ***. **** ***. **** .*** **** 1 DB 0FCH,06CH,06CH,07FH ;**** **.. .**. **.. .**. **.. .*** **** 2 DB 0FDH,0EFH,0EFH,07FH ;**** **.* ***. **** ***. **** .*** **** 3 DB 0FCH,000H,000H,07FH ;**** **.. .... .... .... .... .*** **** 4 DB 0FDH,0FFH,0FFH,07FH ;**** **.* **** **** **** **** .*** **** 5 DB 0FCH,000H,000H,07FH ;**** **.. .... .... .... .... .*** **** 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K0956 ;QUEEN 6 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 1 DB 0FFH,0FEH,0FFH,0FFH ;**** **** **** ***. **** **** **** **** 2 DB 0FFH,0FEH,0FFH,0FFH ;**** **** **** ***. **** **** **** **** 3 DB 0FFH,0DCH,077H,0FFH ;**** **** **.* **.. .*** .*** **** **** 4 DB 0FBH,0DCH,077H,0BFH ;**** *.** **.* **.. .*** .*** *.** **** 5 DB 0F9H,089H,023H,03FH ;**** *..* *... *..* ..*. ..** ..** **** 6 DB 0F8H,083H,082H,03FH ;**** *... *... ..** *... ..*. ..** **** 7 DB 0F8H,021H,008H,03FH ;**** *... ..*. ...* .... *... ..** **** 8 DB 0FCH,071H,01CH,07FH ;**** **.. .*** ...* ...* **.. .*** **** 9 DB 0FCH,021H,008H,07FH ;**** **.. ..*. ...* .... *... .*** **** 0 DB 0FEH,000H,000H,0FFH ;**** ***. .... .... .... .... **** **** 1 DB 0FEH,0FFH,0FEH,0FFH ;**** ***. **** **** **** ***. **** **** 2 DB 0FEH,010H,010H,0FFH ;**** ***. ...* .... ...* .... **** **** 3 DB 0FEH,0D3H,096H,0FFH ;**** ***. **.* ..** *..* .**. **** **** 4 DB 0FEH,010H,010H,0FFH ;**** ***. ...* .... ...* .... **** **** 5 DB 0FEH,0FFH,0FEH,0FFH ;**** ***. **** **** **** ***. **** **** 6 DB 0FEH,000H,000H,0FFH ;**** ***. .... .... .... .... **** **** 7 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** 8 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K09AE DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FEH,0FFH,0FFH ;**** **** **** ***. **** **** **** **** 1 DB 0FFH,0FDH,07FH,0FFH ;**** **** **** **.* .*** **** **** **** 2 DB 0FFH,0DDH,077H,0FFH ;**** **** **.* **.* .*** .*** **** **** 3 DB 0FBH,0ABH,0ABH,0BFH ;**** *.** *.*. *.** *.*. *.** *.** **** 4 DB 0F5H,0ABH,0ABH,05FH ;**** .*.* *.*. *.** *.*. *.** .*.* **** 5 DB 0F6H,076H,0DCH,0DFH ;**** .**. .*** .**. **.* **.. **.* **** 6 DB 0F7H,07CH,07DH,0DFH ;**** .*** .*** **.. .*** **.* **.* **** 7 DB 0F7H,0DEH,0F7H,0DFH ;**** .*** **.* ***. **** .*** **.* **** 8 DB 0FBH,08EH,0E3H,0BFH ;**** *.** *... ***. ***. ..** *.** **** 9 DB 0FBH,0DEH,0F7H,0BFH ;**** *.** **.* ***. **** .*** *.** **** 0 DB 0FDH,0FFH,0FFH,07FH ;**** **.* **** **** **** **** .*** **** 1 DB 0FCH,000H,000H,07FH ;**** **.. .... .... .... .... .*** **** 2 DB 0FDH,0EFH,0EFH,07FH ;**** **.* ***. **** ***. **** .*** **** 3 DB 0FCH,06CH,06CH,07FH ;**** **.. .**. **.. .**. **.. .*** **** 4 DB 0FDH,0EFH,0EFH,07FH ;**** **.* ***. **** ***. **** .*** **** 5 DB 0FCH,000H,000H,07FH ;**** **.. .... .... .... .... .*** **** 6 DB 0FDH,0FFH,0FFH,07FH ;**** **.* **** **** **** **** .*** **** 7 DB 0FCH,000H,000H,07FH ;**** **.. .... .... .... .... .*** **** 8 DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** DB 0FFH,0FFH,0FFH,0FFH ;**** **** **** **** **** **** **** **** ;;K0A06: END ) K0101 DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH DB 0FFH,0FFH,0FFH DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH ;K0116 DB 0FFH ;OFFBOARD ;K0117 DB 02H,04H,01H,06H,05H,01H,04H,02H,0FFH,0FFH ;K0121 DB 03H,03H,03H,03H,03H,03H,03H,03H,0FFH,0FFH ;K012B DB 00H,00H,00H,00H,00H,00H,00H,00H,0FFH,0FFH ;K0135 DB 00H,00H,00H,00H,00H,00H,00H,00H,0FFH,0FFH ;K013F DB 00H,00H,00H,00H,00H,00H,00H,00H,0FFH,0FFH ;K0149 DB 00H,00H,00H,00H,00H,00H,00H,00H,0FFH,0FFH ;K0153 DB 83H,83H,83H,83H,83H,83H,83H,83H,0FFH,0FFH ;K015D DB 82H,84H,81H,86H,85H,81H,84H,82H,0FFH,0FFH ;K0167 DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH ;OFFBOARD DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH K017B DB 80H ;WHITE_FIRST OR 8000=BLACK FIRST K017C DB 0 ;B_TURN K017D DB 80H ;WHITE_FIRST OR 8000=BLACK FIRST K017E DB 0 ;B_TURN K017F DW 0 ;WHITE_EPx K0181 DW 0 ;BLACK_EPx K0183 DW 0 ;NEG_TIME_INIT K0185 DW 0 ;NEG_TIME_INIT ;85,5 =K,k K0187 DB 0 ;ROOK_MOVED @1/2/4/8 K0188 DB 0 ;KING_MOVED @10/1 =W/B ;85,5 =K,k K0189 DB 0 ;ROOK_MOVED @1/2/4/8 K018D DB 0 ;ID ='FROM' TD DISPLAY K018E DW 0 ;LOCTN. 'FROM' TD DSPLY K0100 DB 0 ;BACK_UP_BD_COUNT K0183 DW 0 ;VERT_NEG-TIME_" K0185 DW 0 ;VERT_NEG-TIME_' K01FB DW 0 ;41F/1BB/8-#/LET_LOC <<1410/1450>> ;K01FB DW 1410/1450 ;NUMBER/LETTER_BIT_MAP K0325 DB 0DH,0AH,'BLACK',0DH,0AH,' - ',0DH,0AH,'WHITE',0DH,0AH DB ' - ',0DH,0AH,'$' ;MOVES_LABEL K0341 DW ? K0343 DB '-' K0344 DW ?,0A0DH K0348 DB '$' ;MOVE_LABEL K03B8 DW 0 ;A/50/-50/-A ARROW K03BA DB 0 ;1=ARR/2=DEL K03BB DB 0 K03BC DB 0 ;PLAYER_FROM K03BD DB 0 K03BE DW 0 ;SQ_FROM K03C0 DW 0 ;SQ_TO K03C2 DB 0 ;OPP_SQ_TO K03C3 DB 0 K03C4 DB 'PLAYER (' K03CC DB 'W' ;B/W K03CD DB '): PICK UP PIECE USING "DEL" $' K03EB DB 'PLAYER (' K03F3 DB 'W' ;B/W K03F4 DB '): PLACE CHESSMAN USING "INS" $' K0413 DB 'CHECKMATE $' K0460 DB '>>>>> ILLEGAL MOVE! HIT ENTER. <<<<<<< $' K0489 DB 'SAVE.BD',0,'$' K0492 DB 'LOAD.BD',0,'$' ;K05E6 DB 'MEN_BIT_MAP_START' K0A3A DB 'PPPPPPPPRRNNBBQK' K0A4A DB 'pppppppprrnnbbqk' K0A5B DB 'PPPPPPPPRRNNBBQK' K0A6B DB 'pppppppprrnnbbqk' ;BLACK ROOK KILLED K0DD2 DB 0D9H,00DH,004H,017H,001H K0DE0 DB 062H,072H,06EH,071H,06BH,070H,050H,042H ;CHAR$ VAL. ; 'b r n q k p P B DB 052H,04EH,051H,04BH,00DH,00AH,046H,030H ;CONVERSION ;;K0DD9 ; R N Q K ', 0D, 0A, '0', 0 ;;;K0DF0 01 ,02 ,04 ,06 ;=B/R/N/Q K0DF0 DB 001H,002H,004H,006H,005H,003H,083H,081H ;BOARD VAL. & DB 082H,084H,086H,085H,0FFH,0FFH,0FFH,000H ;ID VALS. ;;K0E00 DB 000H,001H,002H,003H,004H,005H,006H,007H ;OFFSET VAL DB 008H,009H,00AH,00BH,00CH,00DH,00EH,00FH K0E10P DW ? ;MEN_ID_START ;K0101P DW ? ;BRD_START ;BISHOP & PIN -ROOK ;JUMP START K0E10 DB 4,8,0F7H,0BH,9,0F5H ,0F6H,1,0AH,0FFH, 0,0,0,0,0,0 ;ROOK JUMPS ;K0E20 DB 4,8,0F6H,1,0AH,0FFH,0,0,0,0,0,0,0,0,0,0 ;NIGHT JUMPS ;K0E30 DB 8,1,0EDH,0F8H,0CH,15H,13H,8,0F4H,0EBH,0,0,0,0,0,0 ;QUEEN JUMPS ;K0E40 DB 8,8,0F6H,0F7H,1,0BH,0AH,9,0FFH,0F5H,0,0,0,0,0,0 ;KING JUMPS ;K0E50 DB 10,1,0F7H,0F6H,0F5H,0BH,0AH,9,1,0FFH,0FEH,2,3,2,0FCH,3 ;BLACK PAWN JUMPS ;K0E60 DB 6,1,0FFH,1,9,0BH,0AH,14H,0F6H,0,0,0,0,0,0,0 ;WHITE PAWN JUMPS ;K0E70 DB 6,1,0FFH,1,0F5H,0F7H,0F6H,0ECH,0AH,0,0,0,0,0,0,0 K1105 DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,'$' K11BF DB 'PAWN PROMOTION: , R, N or B ? $' K1127 DB ? ;??? K138D DB ? ;LOGO K13E4 DB 20H,20H,'USE ARROW KEYS TO MOVE CHESSMEN: ... $' ;---------------------------------------------( K138A DB 00 ,00 ;.... .... .... .... ;LOGO_BIT_MAP DB 00 ,00 ;.... .... .... .... DB 07 ,0C0H ;.... .*** **.. .... DB 1DH,70H ;...* **.* .*** .... DB 31H,18H ;..** ...* ...* *... DB 21H,18H ;..*. ...* ...* *... DB 61H,2CH ;.**. ...* ...* *... DB 41H,44H ;.*.. ...* .*.. .*.. DB 41H,84H ;.*.. ...* *... .*.. DB 41H,04H ;.*.. ...* .... .*.. DB 63H,8CH ;.**. ..** *... **.. DB 25H,48H ;..*. .*.* .*.. *... DB 39H,38H ;..** *..* ..** *... DB 19H,30H ;...* *..* ..** .... DB 00 ,00 ;.... .... .... .... DB 00 ,00 ;.... .... .... .... 13AD) ;-------------------------------------------------( K041F DB 0C3H ;..** **.. ;NUMBER_BIT_MAP <<1410>> DB 099H ;.**. .**. DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 0FFH ;.... .... DB 0FFH ;.... .... DB 081H ;.*** ***. DB 099H ;.**. .**. DB 0F9H ;.... .**. DB 0F3H ;.... **.. DB 0E7H ;...* *... DB 0E7H ;...* *... DB 0FFH ;.... .... DB 0E3H ;...* **.. DB 0CFH ;..** .... DB 09FH ;.**. .... DB 083H ;.*** **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 0FFH ;.... .... DB 0FFH ;.... .... DB 081H ;.*** ***. DB 09FH ;.**. .... DB 081H ;.*** ***, DB 0F9H ;.... .**. DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 0FFH ;......... DB 0E3H ;...* **.. DB 0C3H ;..** **.. DB 093H ;.**. **.. DB 033H ;**.. **.. DB 001H ;**** ***. DB 0F3H ;.... **.. DB 0E1H ;...* ***. DB 0FFH ;.... .... DB 0C3H ;..** **.. DB 099H ;.**. .**. DB 0F9H ;.... .**. DB 0E3H ;...* **.. DB 0F9H ;.... .**. DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 0FFH ;.... .... DB 0C3H ;..** **.. DB 099H ;.**. .**. DB 0F9H ;.... .**. DB 0E3H ;...* **.. DB 0CFH ;..** .... DB 099H ;.**. .**. DB 081H ;.*** ***. DB 0FFH ;.... .... DB 0FFH ;.... .... DB 0E7H ;...* *... DB 0C7H ;..** *... DB 0E7H ;...* *... DB 0E7H ;...* *... DB 0E7H ;...* *... DB 081H ;.*** ***. DB 0FFH ;.... .... ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;-------------------------------------------------( K01BB DB 0E7H ;...* *... ;LETTER_BIT_MAP <<1450>> DB 0C3H ;..** **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 081H ;.*** ***. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 0FFH ;.... .... DB 003H ;**** **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 083H ;.*** **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 003H ;**** **.. DB 0FFH ;.... .... DB 0C3H ;..** **.. DB 099H ;**.. .**. DB 03FH ;**.. .... DB 03FH ;**.. .... DB 03FH ;**.. .... DB 099H ;.**. .**. DB 0C3H ;..** **.. DB 0FFH ;.... .... DB 007H ;**** .... DB 093H ;.**. **.. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 093H ;.**. **.. DB 007H ;**** 8... DB 0FFH ;......... DB 001H ;**** ***. DB 09DH ;.**. ..*. DB 097H ;.**. *... DB 087H ;.*** *... DB 097H ;.**. *... DB 09DH ;.**. ..*. DB 001H ;**** ***. DB 0FFH ;.... .... DB 001H ;**** ***. DB 09DH ;.**. ..*. DB 097H ;.**. *... DB 087H ;.*** *... DB 097H ;.**. *... DB 09FH ;.**. .... DB 00FH ;**** .... DB 0FFH ;.... .... DB 0C3H ;..** **.. DB 099H ;.**. .**. DB 03FH ;**.. .... DB 03FH ;**.. .... DB 031H ;**.. ***. DB 099H ;.**. .**. DB 0C1H ;..** ***. DB 0FFH ;.... .... DB 099H ;.**. .**. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 081H ;.*** ***. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 099H ;.**. .**. DB 0FFH ;.... .... ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MYDATA ENDS ;} STACK1 SEGMENT PARA STACK 'STACK' ;{ DB 4 DUP (0) STACK1 ENDS ;} END MAIN ;} ;;;DEBUG COMMAND: DEBUG CHCKMT.COM > CHCKMT.TXT^ ;;; -U100 1E00^ ;;; -Q^ ;<<< AFTER TASM >>> ;Assembling file: KVVCHESS.ASM ;**Error** KVVCHESS.ASM(169) BYTE/WORD ;**Error** KVVCHESS.ASM(409) BYTE/WORD ;Error messages: 2 ;Warning messages: None ;Passes: 1 ;Remaining memory: 308k