#include asm86.h #include ti86asm.inc _user_int_ram equ $d2fd fmtflags equ 10 .org _asm_exec_ram ;---------------------------------Identification Junk------------ nop jp ASMstart .dw $0000 .dw Descript ;----------------------------------------------------------------- ASMstart: res 2,(iy+$23) ;turn user int off ld hl,int ;copy prog to user int buffer ld de,_user_int_ram+1 ld bc,int_end-int ldir ld a,(_user_int_ram+1) ;set up checksum byte ld hl,_user_int_ram+($28*1) add a,(hl) ld hl,_user_int_ram+($28*2) add a,(hl) ld hl,_user_int_ram+($28*3) add a,(hl) ld hl,_user_int_ram+($28*4) add a,(hl) ld hl,_user_int_ram+($28*5) add a,(hl) ld (_user_int_ram),a set 2,(iy+$23) ;turn user int on ret Descript: .db "Mode Toggle Interrupt",0 int: push bc push hl ;save registers push af bit shiftAlpha,(iy+shiftflags) ;check if in alpha mode jr z,NoChange ;if not in alpha mode, no changes bit onInterrupt,(iy+onflags) ;check if on was pressed if not, jr z,NoChange ;no change was made jr Change NoChange: bit fmtNorm,(iy+fmtflags) ;check if in Normal Mode jr z,setnorm ;redisplay bit fmtEng,(iy+fmtflags) ;check if in Eng mode jr z,setsci ;if 0, u r in sci jr nz,seteng ;if 1, u r in eng Change: bit fmtNorm,(iy+fmtflags) ;If you were in Normal jr z,SetSci ;Change to Sci bit fmtEng,(iy+fmtflags) ;If you were in Sci jr z,SetEng ;Change to Eng jr nz,SetNorm ; if u were not in Norm or Sci, then u were in Eng SetNorm: res fmtNorm,(iy+fmtflags) ;set flags to Normal Mode (00) res fmtEng,(iy+fmtflags) setnorm: ld de,norm ;load the custom char jr PutChar ;disp it. SetSci: set fmtNorm,(iy+fmtflags) ;set flags to Sci Mode (10) res fmtEng,(iy+fmtflags) setsci: ld de,sci ;custom Sci char jr PutChar ;disp it SetEng: set fmtNorm,(iy+fmtflags) ;set flags to Eng mode set fmtEng,(iy+fmtflags) seteng: ld de,eng ;custom Eng char jr PutChar ;disp it PutChar: ld hl,$FC0F ;place to start displayin ld b,6 ;lines to display PutMap: ld a,(de) ;load a with a line of the char inc de ;point de to the next line ld (hl),a ;load the line to the screen push de ;save de ld de,16 ;load de with 16 add hl,de ;add it to the vid mem address pop de ;re-instate the var djnz PutMap ending: pop bc pop hl ;reset the registers pop af ret ;back to regular interrupt. norm equ $-int+_user_int_ram+1 .db %00100010 .db %00110010 .db %00101010 .db %00100110 .db %00100010 .db %00000000 sci equ $-int+_user_int_ram+1 .db %00001100 .db %00010000 .db %00001100 .db %00000010 .db %00011100 .db %00000000 eng equ $-int+_user_int_ram+1 .db %00011110 .db %00010000 .db %00011100 .db %00010000 .db %00011110 .db %00000000 int_end: .END