Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .nolist
- #include "ti83plus.inc"
- ;#DEFINE PenCol= penrow +1
- .list
- .org $9D93
- .db t2ByteTok, tAsmCmp
- stackpointer: .dw 0,0
- ;=================PROGRAM START====================================
- DI
- LD (stackpointer), SP
- main:
- .db "main",0
- ;load size_string table
- ;load class_string table
- ;load race_file
- ; jp main
- LD HL, main
- call print_wait
- LD HL, main
- LD A, $20
- LD (HL), A
- LD DE, sizeStrTab ;null pointer for table
- LD HL, sizeStrTabName ;file_name
- call LoadGenTable ;initialize the size_string table
- LD DE, classStrTab
- LD HL, classStrTabName
- call LoadGenTable ;initialize the class_string table
- call LoadRaceFile ;initialize the race file
- ;;we now have all our source files loaded, time to start displaying them
- call initRaceMenu
- LD HL, quitstr
- call print_wait
- jp quit
- ;call makeRaceMenu
- ;open the file and validate
- ;=============================================================================================================================================
- ;LOAD RACE FILE================================================================================================================================
- ;=============================================================================================================================================
- ;load the race file and validate it, store its info into static variables
- LoadRaceFile:
- .db "ldRaceFile",0
- LD HL, LoadRaceFile
- call print_wait
- LD HL, racefilename
- rst 20h ;$20= rMov9ToOp1......load name into op1
- b_call(_ChkFindSym) ;lookup variable in op1
- JP c, raceNotFound
- AND %00011111 ;race file datatype is in accumulator, however, high 3 bits are garbage
- CP $15 ;check to make sure racefile is an appvar, with appvar tok
- JP nz, raceCorrupt
- XOR A ;clear a
- CP B ;B=0 means variable resides in RAM, if its not, then that's no good
- JP nz, raceCorrupt
- EX DE, HL
- LD (racefile), HL;HL points to first byte of file
- LD A, $BE
- CP (HL) ;Check for first half of teh header
- JP nz, raceCorrupt
- LD A, $EF
- INC HL ;header+1
- CP (HL) ;Check second half of header
- JP nz, raceCorrupt
- LD D, (HL) ;load the size word into DE
- INC HL ;hl=header+2
- LD E, (HL)
- INC HL ;hl=header+3
- LD (racefileSize), DE ;store it in little endian-ness
- LD D, (HL) ;DE points to table offsest, load the offset word into DE
- INC HL ;hl= header+4
- LD E, (HL)
- INC HL ;hl= header+5
- LD (raceTableOffset), DE ;offset of race table from index now stored in little endianness
- ;now to make a pointer to the data table segment of the race file
- LD BC, (raceFile)
- LD H,C
- LD L,B ;load racefile pointer into HL, too bad its LITTLE ENDIAN
- ADD HL, De ;HL = raceFilePtr+offeset...points to beginning of DATA TABLE
- LD (raceTablePointer), HL ;LITTLE ENDIAN
- ret ;return
- ;=============================================================================================================================================
- ;LOAD GENERAL TABLE FILE================================================================================================================================
- ;=============================================================================================================================================
- ;Load a general table of numbers of strings that starts with 0xf00d
- ;Stack Args- HL=pointer to filename
- ; DE=where to store pointes
- ;note that registers change a lot here
- LoadGenTable:
- PUSH HL
- PUSH DE
- rst 20h ;$20= rMov9ToOp1......load name into op1
- b_call(_ChkFindSym) ;lookup variable in op1, if found, CA=0; ACC= data_type_info; B=0 (if in ram); DE= pointer; HL= sym_table
- POP HL ;HL=where to put pointers, DE= pointer to Struct, STACK_TOP=pointer to filename
- JP c, genTabNotfound
- AND %00011111 ;file's datatype is in accumulator, however, high 3 bits are garbage
- CP $15 ;check to make sure file is an appvar, with appvar tok
- JP nz, genTableCorrupt
- XOR A ;A=0
- CP B ;B=0 means variable resides in RAM, if its not, then that's no good
- JP nz, genTableCorrupt
- LD (HL),D ;Store file Address......De points to first byte of file, this instruction is a little premature, but whatever
- INC HL ;....
- LD (HL),E ;Address stored.
- EX DE,HL ;HL points to first byte in file
- LD A, $F0 ;prepare to check header
- CP (HL) ;Check for first half of teh header
- JP nz, genTableCorrupt
- LD A, $0D ;load second check value
- INC HL ;point DE to next byte
- CP (HL) ;Check second half of header
- JP nz, genTableCorrupt
- POP HL ;Return stack to normal, so we can return
- RET
- ;=============================================================================================================================================
- ;Display list of races================================================================================================================================
- ;=============================================================================================================================================
- ;;index format is (id)[offset) with each entery being 3 bytes long
- ;;
- initRaceMenu:
- LD A, 0 ;set currently selected string index to zero
- LD (m0index), A
- buildRaceMenu:
- .db "buildRaceMen",0
- LD HL, buildRaceMenu
- call print_wait
- ; LD A, (raceTablePointer) ;LD DE, (raceTablePointer) so we know when to stop
- ; LD E, A
- ; LD A, (raceTablePointer+1)
- ; LD D, A ;DE = START OF TABLE
- LD A, (racefile+1);load HL to START OF RACEFILE
- LD H, A
- LD A, (racefile) ;load pointer to racefile
- LD L, A ;HL = raceFile[0]
- LD B, 0
- LD C, 7
- ADD HL,BC ;HL = racefile[7]
- ;;HL points to Byte 2 of the index, the MSB of the offset of the first race_entery
- LD A,(m0index) ;the currently selected index will be the first item displayed on the list
- LD B, A
- ADD A, B
- ADD A, B ; A= 3*oldA (this way when we add A to L, we are now offset the correct number of races to display)
- LD C, A
- LD B, 0 ;BC is the offset to the index address of first item to display
- ADD HL,BC ;HL points to dataTableOffset of first race we want to display, it will be assumed that on entering, this will never overshoot the end of the table
- XOR A ;
- LD (it),A ;reset the iteration count
- LD DE, sbuff0 ;prepare to enter the next segment
- PUSH DE
- call clearsbuff ;REMOVED FOR DEBUGGING TEMPORARILY
- POP DE
- _BRML1: ;the loop to load the race names onto the string table sbuff
- ;on entery, HL= pointer to 2nd byte of the next race entery to be read from the index
- ; DE= next entery of sbuff
- nop
- ;;;;;;;
- .db "_BRML1",0
- push hl
- LD HL, _BRML1
- INC HL
- call print_wait
- pop HL
- ;;;;;;;;;;;;
- _BRML1b: ;;from now on, this little space needs to say what the rest of the section does
- LD B,(HL) ;B=msb of race_entery offset
- INC HL
- LD C,(HL) ;C=lsb of race_entery offset
- INC HL
- INC HL
- PUSH HL ;stack = MSB of next race in index, BC= race_entery offset from start of race_table
- LD A,(raceTablePointer)
- LD L, A
- LD A,(raceTablePointer+1)
- LD H, A
- ADD HL, BC ;HL points to first byte of race
- LD B,0
- LD C,2
- ADD HL,BC ;hl=first byte of Race NAME
- LD B,0
- LD C,8 ;8 reps
- LDIR ;copy race name into buffer
- ;LD (DE), C ;c= zero because loop is over, so append a NULL to the end of the stirng sbuff[n][9]
- INC DE ;point DE to the next row in SBUFF
- LD A,(it)
- INC A
- LD (it),A ;increase the iteration count
- POP HL ;hl=next table index to read, even if we break, this fixes the stack
- CP 8 ;check how many its we did
- JP Z, _BRML2;if we have looped 8 times, break
- PUSH DE
- LD A, (raceTablePointer)
- LD E, A
- LD A, (raceTablePointer+1);
- LD D, A
- CALL cpHL_DE ;make sure we haven't overshot the end of the index
- POP DE
- JP C, _BRML1b;continue if we are still within the index, otherwise fall thorugh
- _BRML2: ;;sbuff now contains all the enteries to dispaly, prepare the rest of the data
- ; jp _BMRL3;DEBUG LINE
- .db "_BRML2",0
- push hl
- LD HL, _BRML2
- call print_wait
- pop HL
- ;;;//done with the error testing
- ; push hl
- ; ld hl, dbg1
- ; call print_wait
- ; pop hl
- LD HL, raceFileName+1 ;hl points to string "Races"
- LD B,0
- LD C,6 ;for 5 chars + null
- LD DE, string1
- LDIR ;copy "races",0 into string1
- ;;now to set up teh flags for the menu to be displayed, B will be our flags cause it is 0 right now
- SET 1,B; B is going to be our flags bye, byte 0 =[back], 1=[info] 2= [up], 3=[down]
- LD A, (m0index);a = current index in the menu
- CP 0
- JP Z, _BMRL3;is the current index zero?
- SET 2,B ;if there are previous options in the list, allow the [back] button to be enabled
- _BMRL3: ;COMMENT ME
- .db "_BRML3",0
- push hl ;what is HL?
- LD HL, _BMRL3
- call print_wait
- pop HL
- ;;we want to find out if there are more strings below the first one to be displayed
- ;LD C, A ;save a
- LD A, (sbuff1) ;is the next item in the string index null (because sbuff0 is the current string, is sbuff1 cointains sth, we can scroll to it
- OR 0
- JP Z, _BMRL4 ;if sbuff[1] ==null, leave b[3] as zero
- SET 3, B
- _BMRL4: ;COMMENT ME
- .db "_BRML4",0
- ; push hl[DEBUG DISABLED] what was hl before?
- LD HL, _BMRL4
- call print_wait
- LD HL, sbuff0
- call print_wait ;;print contents of SBUFF0
- ; pop HL [DEBUG DISABLED]
- call DispMenu ;sbuff has list of strings to display, s1 has title of menu, B has flags
- _BMRinput:
- b_call(_GetKey)
- CP $05 ;enter pressed
- jr z,_BMRenter
- ; CP $49 ;y= pressed
- ; Jr z,_BMRyeq
- CP $48 ;[window] presed
- Jr z,_BMRwin
- CP $5A ;[trace] pressed
- Jr z,_BMRtrace
- CP $44 ;[graph] pressed
- Jr z,_BMRgraph
- ; CP $03 ;up pressed
- ; Jr z,_BMRup
- ; CP $04 ;down pressed
- ; Jr z,_BMRdown
- jr _BMRinput
- ;handle input
- _BMRwin: ;;info was pressed, spawn a new menu about this racce
- LD HL, quitstr
- call print_wait
- jp quit
- jp buildRaceMenu ;;we need to redisplay the menu once we are done
- _BMRtrace: ;;up one item
- LD A, (m0index)
- CP 0
- Jr Z, _BMRinput
- INC A
- LD (m0index), A
- JP buildRaceMenu
- _BMRgraph: ;down one item
- ;we need to find out how many items are in the index
- LD A, (raceTableOffset)
- LD L, A
- LD A, (raceTableOffset+1) ;HL = how far crap is frm teh start of the race_File
- LD H, A
- LD C, 6
- LD B, 0 ;we want to subtract 6 from the offset of the racceTable
- SCF
- CCF ;reset carry flag just in case
- SBC HL,BC ;;HL = the size of the index section
- LD D, 3 ;divide the index size by 3 (the size of each entery)
- call Div_HL_D ;hl = numbre of enteries
- LD A, (m0index);get the currently selected menu item
- CP L ;we shouldn't have more than 255 races
- Jr NC, _BMRinput ;if we are at the max index possible, go back
- INC A
- LD (m0index), A
- JP buildRaceMenu
- _BMRenter: ;;still testing, so just quit if enter pressed
- LD HL, quitstr
- call print_wait
- jp quit
- ;=============================================================================================================================================
- ;Display MENU================================================================================================================================
- ;=============================================================================================================================================
- ;IN: string1- title of menu
- ; sbuff0 - first string of menu to display
- ; B -flags
- ; c -button set to use, currently unimplemented
- ;assumes all strings in sbuff are 8 chars+null
- DispMenu:
- .db "dispMenu",0
- push hl
- ld hl, DispMenu
- call print_wait
- pop hl
- PUSH BC
- b_call(_ClrLCDFull)
- XOR A
- LD (pencol),A
- LD (pencol+1),A ;clear pen row/col
- LD HL, string1
- b_call(_VPutS) ;display contents of string1
- SET TextInverse, (IY + TextFlags) ;set reverse video on
- LD H,10
- LD L,10
- LD (pencol),HL
- LD HL, sbuff0;
- b_call(_VPutS);display sbuff0
- RES TextInverse, (IY + TextFlags)
- LD D, 10
- LD E, 10
- LD B,8 ;Our counter
- _DML1: ;loop to display the rest of the menu, assumes BC points to prev pen col, HL points to next string to display
- call cpHL_0 ;see if hl is null
- JP z, _DML2 ;if null, break out of loop
- DEC HL ;undo change to hl
- LD A, D
- ADD A, 8
- LD D, A
- LD (pencol), DE;inc row by 8
- b_call(_VPutS);display sbuff[n], move HL to point to next string
- DJNZ _DML1 ;repeat untill B=0
- ;;;;;;EVERYTHING FROM HERE DOWN NEEDS TO BE REDONE
- ;;;;;;CONSIDER REDOING THIS WITH SELF MODIFYING CODE FOR THE BIT INSTRUCTION SO THIS CAN BE LOOPED
- _DML2: ;;now display the stupid little options at the bottom of the screen
- LD E, 0 ;load a 2 chars up
- LD D, 63-14
- LD B, 19 ;19 iterations required to cover the whole screen
- LD (pencol), DE
- LD A, $5f ;a= '_'
- _DML3: ;loop and display "_____" across the bottom of the screen
- b_call(_PutC)
- DJNZ _DML3
- ;;now we need to insert the code to actually draw the dumb little text things based off of the flags in b,
- POP BC
- ;;code to FIGURE OUT WHICH BUTTON SEST
- ;we want to make B= COUNTER, C= FLAGS
- ;because there are two padding buttons being inserted, we need to shift two bits of C over two spaces
- ;old C %0000FFFF new C %00ff00ff where f = flag bit
- LD A,B ;four buttons, two pads
- LD B,C
- Ld C,A ;
- SLA C
- SLA C
- AND C ;;do A & C, then mask off middle bits
- AND %00110011
- LD HL, bs00;hl =first button
- LD D,63-7
- LD E, 0
- _DMButL0: ;check and do first button
- ;hl points to next string to display
- LD (pencol), DE ;update pencol regardless of button being enabled,
- SRL C ;check flags[n]
- JP NC, _DMNoBut
- b_call(_VPutS) ;display First String and happyness
- JR _DMButL1
- _DMNoBut:
- INC HL
- INC HL
- INC HL
- INC HL
- INC HL ;;add 5 hl
- _DMButL1:
- LD A, E
- ADD A, 17
- LD E, A
- LD (pencol), DE ;update pencol regardless of button being enabled,
- DJNZ _DMButL0 ;loop to display the rest of the buttons if B still has shit
- DML4: ;;we are done displaying the stupid menu things
- .db "done with menu",0
- push hl
- ld hl, dml4
- call print_wait
- pop hl
- RET ;;give control back to the calling function
- ;=============================================================================================================================================
- ;ERROR CONDITIONS ================================================================================================================================
- ;=============================================================================================================================================
- ;the race file was not found
- ;bitch and quit
- raceNotFound:
- LD HL, raceFileNotFoundStr
- call print_wait
- jr quit
- raceCorrupt:
- LD HL, raceCorruptStr
- call print_wait
- jr quit
- ;first item on stack is name of string we tried to look up
- ;function copies error message to longs1, points DE to name of not_found file, concatinates them, bitches, then quits
- genTabNotFound:
- LD HL, fileNotFoundStr
- CALL stringLength ;preserves HL
- LD B, 0
- LD C, A ;bc = lenght of base error string
- LD DE, longs1
- ldir ;Copy race_corrupt string into Longs1
- LD HL, longs1
- POP DE ;DE = name of not found file
- CALL concat ;combine them, HL = address of longs1
- Xor A ;A=0
- LD (DE), A;make sure end of string is null
- CALL print_wait;bitch our errormessage
- jp quit ;quit
- ;;similar idea to the genTabNotFound function
- ;;the table was found, but something is wrong with it
- ;;create an error message and display it
- genTableCorrupt:
- LD HL, fileCorruptStr
- CALL stringLength ;preserves HL
- LD B, 0
- LD C, A ;bc = lenght of base error string
- LD DE, longs1
- ldir ;Copy race_corrupt string into Longs1
- LD HL, longs1
- POP DE ;DE = name of not found file
- CALL concat ;combine them, HL = address of longs1, DE= end
- XoR A
- LD (DE), A;make sure end of string is null
- CALL print_wait;bitch our errormessage
- jp quit ;quit
- ;make a str.lenght function that takes HL as str* and returns HL= first char of string, A = string's length
- ;=============================================================================================================================================
- ;CLEAR SBUFF================================================================================================================================
- ;=============================================================================================================================================
- ;clears sbuff or s1buff
- ;INPUT: DE =address of sbuff0 or s1buff0
- ;
- ;
- clearsbuff:
- .db "clearsbuff",0
- push HL
- LD HL, clearsbuff
- call print_wait
- pop hl
- LD B,90 ;90 bytes to clear
- LD A,0
- clearsbuff1:
- LD (DE),A
- INC DE
- DJNZ clearsbuff1
- ret
- ;=============================================================================================================================================
- ;LEAVE PROGRAM================================================================================================================================
- ;=============================================================================================================================================
- quit:
- LD HL, quitstr
- call println
- ;LD HL, (stackpointer)
- ;LD E, (HL)
- ;INC HL
- ;LD D, (HL)
- ;EX DE, HL ;not sure if this is needed, but i just want it to work *sob*
- LD SP, (stackpointer)
- LD HL, (stackpointer)
- b_call(_DispHL)
- EI
- RET ;return control to the operating system
- ;=============================================================================================================================================
- ;Compare HL to End of Index================================================================================================================================
- ;=============================================================================================================================================
- ;;Make sure HL hasn't left the index segment of the Race or Special Ability file
- ;;IN: HL- Current location in index (address)
- ;; DE- Pointer to start of TABLE SECTION
- ;;
- ;;out:CF- reset if we are out of bounds, set if we are good
- ;;
- ;;Function: HL>=DE (NC if true, C if false) We have a problem if HL is bigger
- ;;DESTROYS: A
- cpHL_DE:
- ;.db "cpHL_de",0
- ; push hl
- ; ld hl, cpHL_DE
- ; call print_wait
- ; pop hl
- LD A, H ;a= msb of CURRENT index
- CP D
- JP z, cph_lsb;if the MSBs are equal, compare the LSBs, else, return result of comparison
- RET ;the comparison was resolved, return the carry flag result
- cph_lsb:
- LD A, L ;a= lsb of TABLE_POINTER
- CP E
- RET ;return NC if HL
- ;=============================================================================================================================================
- ;(HL) NULL?================================================================================================================================
- ;=============================================================================================================================================
- ;;OUT: CF status, HL+=1
- ;;DESTROYS: A
- cpHL_0:
- LD A, (HL) ;a= msb of CURRENT index
- CP 0
- JP z, cph0_lsb;if the MSBs are equal, compare the LSBs, else, return result of comparison
- RET NZ ;the comparison was resolved, return the carry flag result
- cph0_lsb:
- INC HL
- LD A, (HL) ;a= lsb of old (HL)
- CP 0
- RET ;return NC if HL
- ;=============================================================================================================================================
- ;FIND STRING LENGTH================================================================================================================================
- ;=============================================================================================================================================
- ;INPUT: HL -address of string
- ;OUTPUT:HL -address of string
- ; A -length of string including the null
- ;
- stringLength:
- PUSH HL
- PUSH BC ;Save BC
- LD A, 0
- LD C, 0 ;gonna start at zero because BC will decriment with each iteration, finding (neg)C will tell us the length of the string
- LD B, 0
- CPIR ;search for the null at the end of the string (compare (HL) to A) , where A is zero
- LD A, C ;a= negative length of string
- NEG ;a= length of string
- POP BC
- POP HL
- ret
- testLength:
- LD HL, testStr
- call stringLength
- LD H, 0
- LD L, A
- call printHL_wait
- ret
- ;=============================================================================================================================================
- ;Concatinate Strings================================================================================================================================
- ;=============================================================================================================================================
- ;INPUT: HL -address of string1
- ; DE -Address of string2
- ;OUTPUT:HL -address of string1
- ; DE -end of string1
- ;Calculates String1+String2, assuming String1 has enough space after it to house String2
- concat:
- PUSH BC
- PUSH HL
- CALL stringLength ;get length of string1
- LD B, 0
- LD C, A ;BC =string1.length()
- ADD HL, BC;HL points to end of string
- DEC L ;compensate for the null, now HL points to the null
- EX DE, HL; DE is now Str1, HL, str2
- CALL StringLength
- LD C,A ;BC =string2.length()
- LDIR ;copy bytes from string2 to string1
- xor A
- LD (DE), A ;add a zero to the end of the string
- POP HL
- POP BC
- RET
- testConcat:
- LD HL, dbg4
- LD DE, dbg1
- call concat
- call print_wait ;display the concatinated string
- ret
- ;=============================================================================================================================================
- ;DIVIDE HL by D================================================================================================================================
- ;=============================================================================================================================================
- ;input HL, D
- ;output HL, A
- Div_HL_D: ; HL = HL ÷ D, A = remainder
- XOR A ; Clear upper eight bits of AHL
- LD B, 16 ; Sixteen bits in dividend
- _loop:
- ADD HL, HL ; Do a SLA HL
- RLA ; This moves the upper bits of the dividend into A
- JR C, _overflow
- CP D ; Check if we can subtract the divisor
- JR C, _skip ; Carry means D > A
- _overflow:
- SUB D ; Do subtraction for real this time
- INC L ; Set bit 0 of quotient
- _skip:
- DJNZ _loop
- RET
- ;=============================================================================================================================================
- ;PRINT TEXT-----takes HL as an arg================================================================================================================================
- ;=============================================================================================================================================
- println:
- PUSH HL
- PUSH DE
- PUSH BC
- PUSH AF
- b_call(_ClrLCDFull)
- POP AF
- POP BC
- POP DE
- LD L, 0 ;col
- LD H, 10 ;row
- LD (pencol), HL
- POP HL ;HL was never POPed before, hl now ready to display
- b_call(_VPutS) ;print the message
- ret ;go back
- ;=============================================================================================================================================
- ;PRINT TEXT AT POSITION ----takes HL && BC as an arg================================================================================================================================
- ;=============================================================================================================================================
- println2:
- PUSH DE
- PUSH HL
- PUSH BC
- PUSH AF
- b_call(_ClrLCDFull)
- POP AF
- POP BC
- POP HL
- POP DE
- LD (pencol), BC
- b_call(_VPutS) ;print the message
- ret ;go back
- ;=============================================================================================================================================
- ;wait=========================================================================================================================================
- ;=============================================================================================================================================
- wait:
- ret ;DOESNT WORK, JUST EXITS
- PUSH HL
- LD HL, $FF
- wl1:
- DEC HL
- JP nz, wl1
- POP HL
- ret ;go back
- ;=============================================================================================================================================
- ;PRINT AND WAIT=========================================================================================================================================
- ;=============================================================================================================================================
- ;clears screen, prints string, waits for button press, used mainly for debugging and displaying program status
- ;HL - adress of string to print
- ;SAVES all registers
- print_wait:
- PUSH BC
- LD B,0
- LD C,0
- call println2
- PUSH AF
- PUSH HL
- PUSH DE
- b_call(_GetKey)
- ;call wait
- POP DE
- POP HL
- POP AF
- POP BC
- ret
- ;=============================================================================================================================================
- ;PRINT HL AND WAIT=========================================================================================================================================
- ;=============================================================================================================================================
- ;clears screen, prints string, waits for button press, used mainly for debugging and displaying program status
- ;HL - adress of string to print
- ;SAVES all registers
- printHL_wait:
- PUSH BC
- PUSH AF
- PUSH HL
- PUSH DE
- b_call(_DispHL)
- b_call(_GetKey)
- POP DE
- POP HL
- POP AF
- POP BC
- ret
- ;
- ;=================file specific data segment=========================
- racefilename: .db $15, "Races",0 ;appvar tok and name
- racefile: .dw 0,0 ;address in RAM of racefile LITTLE ENDIAN
- racefileSize: .dw 0,0 ;size of said file LITTLE ENDIAN
- raceTableOffset: .dw 0,0 ;offset of actual races from index LITTLE ENDIAN
- raceTablePointer:.dw 0,0 ;pointer to first byte of raceTable, LITTLE ENDIAN
- m0index: .db 0 ;;we can have up to 3 nested menus with saved indexes before something has to go
- m1index: .db 0
- m2index: .db 0
- sizeStrTabName: .db $15, "sizeStr",0 ;for the general string tables
- sizeStrTab: .dw 0,0
- classStrTabName: .db $15, "classStr",0
- classStrTab: .dw 0,0
- sword:.db 0 ;just a place to store swap data
- it:.db 0 ;for counting iterations of a loop
- ;;read only from here down
- testStr: .db "0123456789",0 ;10 bytes + null
- raceCorruptStr: .db "Race file corrupt",0
- raceFileNotFoundStr: .db "Race file not found",0
- fileNotFoundStr: .db "File Not Found:" ,0 ;15 bytes +null
- fileCorruptStr: .db "File Corrupt:",0 ;13 bytes +null
- ;button strings
- bs00: .db "back",0
- bs01: .db "info",0
- .db 0,0,0,0,0,0,0,0,0,0 ;10 bytes padding for future buttons
- bs02: .db "up ",0
- bs03: .db "down",0
- ;menuIdex: .db 0;general data for current menu index. must be saved to stack when nested menu's created
- ;==========================DATA SEGMENT==============================
- newCharStr: .db "Make a new Character",0
- enterNamestr: .db "Enter a name",0
- ;;debug strings------------------------------------------------
- outOfMemStr: .db "no memory exists",0
- probWithName: .db "Prob With Name",0
- quitstr: .db "ending",0
- charmade: .db "Character made!",0
- dbg1: .db "Check 1",0,
- dbg2: .db "Check 2",0,
- dbg3: .db "Check 3",0,
- dbg4: .db "Check 4",0,
- ;;begin blank var segment
- ;two short contiguous string buffers
- sbuff0: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff1: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff2: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff3: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff4: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff5: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff6: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff7: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff8: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- sbuff9: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff0: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff1: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff2: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff3: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff4: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff5: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff6: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff7: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff8: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- s2buff9: .db $FF,0,0,0,0,0,0,0,0 ;8 char buffer, 9 bytes long
- ;two more general purpose 8 char +null strings
- string1: .db 0,0,0,0,0,0,0,0,0 ;8 bytes and null
- appvartok: .db $15 ;point HL to here when making an appvar name to include the token
- string2: .db 0,0,0,0,0,0,0,0,0 ;8 bytes and null
- longs1: .db "000000000000000000000000000000",0 ;30 char string + null (31 bytes)
- longs2: .db "000000000000000000000000000000",0 ;30 char string + null (31 bytes)
- meds1: .db "000000000000000",0 ;15 byte string+null
- meds2: .db "000000000000000",0 ;15 byte string+null
- curFile: .db 0
- openFiles .dw 00, 00, 00
- .end
- .end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement