#include "TI86.inc" .org _asm_exec_ram #define checksum $47 nop #ifdef checksum jp start #else jp getchecksum #endif .dw 0 .dw description int_start: #ifdef checksum .db checksum #else .db 0 #endif in a,(5) push af ld a,$0d out (5),a ld a,%01110111 out (1),a in a,(1) bit 6,a ;prgm jr nz,exit ld a,%00111111 out (1),a in a,(1) rra ;f5 ld hl,_asapvar+1 jr c,check_ztetris ld de,insane-int_start+_alt_int_chksum call _pstrCmp jr nz,exit ld hl,_textShadow+112 ld a,(hl) ld b,15 copy_row: inc hl ld (hl),a djnz copy_row call $d9cb ;redraw blocks jr exit check_ztetris: ld c,a ld de,ztetris-int_start+_alt_int_chksum call _pstrCmp jr nz,exit ld a,c rra ;f4 jr c,check_f3 ld hl,$cfaf ld bc,$08ff fill_rows: ld (hl),c inc hl djnz fill_rows ld hl,$e06f ld (hl),$06 push hl call $e057 ;redraw bottom of well pop hl ld (hl),$12 jr exit check_f3: rra ;f3 jr c,exit ld hl,($c121) ;score ld de,371 add hl,de jr c,exit ld ($c121),hl ld hl,(_penCol) push hl call $deac ;redraw stats pop hl ld (_penCol),hl exit: pop af out (5),a ret ztetris: .db 7,"ztetris" insane: .db 6,"insane" off: .db "Cold.",0 on: .db "Hot!",0 description: .db "Love tester by Jonah Cohen",0 start: call _runIndicOff call _flushAllMenus call _clrLCD ld hl,int_start ld de,_alt_int_chksum ld bc,201 ldir ld (_penCol),bc ld hl,_Flags+$23 ld a,(hl) xor 4 ld (hl),a bit 2,a ld hl,off jr z,status ld l,on&$ff status: call _vputs im 1 getkey: call _getcsc or a jr z,getkey jp _clrLCD #ifndef checksum getchecksum: call _clrWindow ld a,'$' call _putc ld hl,int_start+1 ld a,(hl) dec hl ld de,40 ld b,5 checksum_loop: add hl,de add a,(hl) djnz checksum_loop push af call _SHRACC call dispnibble pop af and $0f call dispnibble jp _newline dispnibble: cp 10 jr nc,skipadd add a,'0' skipadd: jp _putc #endif .end