changes from version ?? to 1.1: * user interface add key = to change the registers A,B,C,D,E,H,L,IX,IY,A',B',C',D',E',H',L',I,R * display and update the cycle counter and the refresh register * BUG in disasm.c f_ld LD rr,(nn) [only 1 byte loaded] fixed! * BUG in disasm.c f_ex EX (SP),IX break missing ==> runs into EX (SP),IY; fixed! * EI replaced by IFF1 & IFF2 (correct LD A,R & LD A,I) * user interface @(CPU reset), #(clear memory), *(clear all cpu register), $(clear tick counter), &(SP init) * console.c: BUG in c_init() usuage of undefined variable t fixed! changes from version 1.1 to 1.9: * IN, OUT, INI, OUTD, ... all implemented * console.c: BUG(?) in c_init() if ICANON cleared MIN should bet set to 1 * BUG in disasm.c f_add all 16-bit addition with carry bit :( fixed! * declaration of an assembler label may be appended by a colon * if PC, SP, and MEMP input is requested current values are displayed in hexa * HALT really halts the CPU now if interrupt is disabled else set runmode false * user interface !(NMI) implemented * user interface . puts compiled instructions into memory and increases addr * user interface = = to change 16-bit registers BC,DE,HL,BC',DE',HL',IX,IY * BUG in disasm.c f_adc wrong carry/h/v flag calculation fixed! * BUG in disasm.c f_sbc wrong carry/h/v flag calculation fixed! * interrupt behaviour simulated, except IM=0 (probably tick count wrong) * user interface D(dump/disassemble into file) toggle DI/EI to key ^ changed * PC and SP defaults into hexa, CALL, JP and RST in disassembling format, too * user interface " (protocol instructions executed) * bank switching logic implemented (still experimental) * BUG in disasm.c f_ld if 16 bit load from 0xffff adress OVERFLOW fixed! * disasm.c: f_sll opcode CB30-CB37 implemented * warnings and error_msg now occupy only the very last line (row 23) * user interface % sets a breakpoint with a run counter at current PC * breakpoints (address & counter) are displayed in row 22 * pseudo instruction EQU in assembler (asm.c) implemented * CPU Halt-pin/status is displayed in upper right corner if active * turbo mode improved a lot: 4 levels now (16 min, 380 sec, 38 sec, 2.5 sec) * disasm.c: f_nop2 all undocumented ED-opcodes implemented * all the man pages updated * turbo mode replaced by controling the clock speed/frequency * the ports are implemented as a map onto one binary file named .Z80_ports * hardware_clock.c and lcd_display.c provided as examples for port usage changes from version 1.9 to 2.0beta: * BUG in inst-dist.c ED63 ld hl,(nn) A_NUM -> A_PODDLE_NUM fixed! * z80-asm permits in the case of exactly 1 section and inputfilename ends with .asm the outputfile to be optional (.asm is exchanged to .z80 for outputfile) * BUG in z80-asm: if start > highest byte in memory undefined outputfile length * HALT halts the CPU now if interrupt is enabled else set runmode false necessary for emulator mode ==> user interface & sets a DI on stack * user interface ! toggle keyboard read disabled/enabled in run mode user interface ESC now simulates a NMI * z80-mon has option -E for emulator mode (immediately CPU start) * SIGTERM, SIGHUP terminates z80-mon, SIGUSR1 causes reset, SIGUSR2 causes NMI, SIGABORT causes cpu_wait=1 and SIGTRAP makes a CPU dump * keyboard mapping implemented (used for IN from port stdin) * simul.c: decode() now handles stray FD and DD prefixes * all FD and DD are simulated by decode() ==> IXh,IXl,IYh,IYl introduced in regs.c and regs_token and set N_REGISTERS to 21 , global _ushort ddfdcb_reg * decoder and executer [decode() and execute.c] totally checked. Now memory read access separated from memory write access. Usage of DATA pins! * in disasm.c: all 11 CB-executions and all 8 arith/logic-A-executions bundled * BUG in disasm.c: f_cp/f_cpd/f_cpi/f_cpdr/... h-flag wrong calculated fixed! * BUG in disasm.c: f_dec p-flag wrong calculated fixed! * the f_... functions in execute.c now return a pointer to char, doesn't print * total memory access encapsulated in memory.c / io-data access simulated * Makefile updated (*.h) goes now into hardware, make install added * doc/man pages updated * in asm.c: write_to_memory(), set_start_address(), get_current_address() introduced for usage of compile() [now returns the number of bytes writen] changes from version 2.0b to 2.0c: * BUG in asm.c: lexical_analysis: multiple label definition possible fixed! * BUG in compile.c: c_add: ADD IY,IX valid(typo), ADD IY,IY invalid fixed! * BUG in execute.c: f_alu: ADD,ADC,SBC use second operand (bad nemonic) fixed! * BUG in execute.c: f_neg: carry-flag always effected (carry=!!A) fixed! * BUG in execute.c: f_bit: sign-flag effected only if bit 7 tested fixed! * BUG in execute.c: f_daa: total nonsense! (>=4 independent errors) fixed! * z80-asm.c Option -l added ==> in asm.c LISTING in pass 2 evaluated * in execute.c: in disassembling mode jr and djnz instruction offset with sign * user interface t enables base switch for disassembling constants * user interface L now can read true binary files into memory * user interface a,b changed to u,v and e deleted [reserved for register] * pseudo instructions DEFM, ALIGN in assembler (asm.c) implemented (sll,too) * Z80-Asm accepts integers to base 16 also if they have a h or H postfix * hash table structur/allocation optimized and option -c in z80-asm.c added changes from version 2.0c to 2.0: * pseudo instruction END added and max label length to be 63 documented * in asm.h: better interface (highest_address,generated_bytes,set_compile_pass) * in asm.c: compile(void) now detects an EOF (take_line reads exactly 1 line) changes from version 2.0 to 2.1 * in asm.c: compile(char *txt) ==> take_line(..) not longer obligate! * ticks encapsulated ==> wait_tics(AMOUNT) and quartz.c/quartz.h introduced * -DEFINES in Makefile and hardware/z80-ctc.c (experimental/beta Z80_CTC) * BUG in compile.c: IX-/ IY-displacements must be < 128 and >= -128 fixed! * in asm.c: in compile() all error_messages bundled (do we like to translate?) * daisy_chain realized / more realistic interrupt handling by hardware * bank switching logic re-implemented (still all banks must have same size) * in regs.c register names to upper case (better to distinguish from addresses) * user interface j switches relative versa absolute address (disasm jr/djnz) * several small errors/bugs fixed * user interface j enables now labeled address disassembling for jp/call/jr * user interface j enables relative disassembling via two-pass disassembling * z80-mon with -E now reads CPU status from .CPU and finishes if HALT in DI * algebraic expressions evaluation in asm.c: valid operators ~,&,|,^,+,-,*,/,% * in asm.c: @ is a special 'label' indicating the current PC * in asm.c: explicit binary constants must be lead-in by # replacing % prefix additionaly (to the 0x) the $ prefix for hexadecimal numbers is availible * BUG in compile.c: c_ret: typo in case PO wrong machine code generated fixed! * several DJGCC compilation bugs removed (missing includes,defines,typos) changes from version 2.1c to 2.2: * BUG in asm.c: convert_arg: memmove deletes IX or IY but needed later fixed! * BUG in execute.c f_out/f_in: ts[] resp. tf[] must be at least 5 chars fixed! * BUG in compile.c c_ld: LD HL,(addr) should generate opcode 2A not ED6B fixed! * BUG in compile.c convert_arg: char consts must not be converted to upper case fixed! * BUG in compile.c convert_arg: missing {} for for-loop body which results in all strings became nilstrings fixed! * BUG in compile.c convert_arg: bug in string parsing, wrong indices fixed! * BUG in execute.c f_ld: LD (addr),rr puts only lower byte into memory fixed! * BUG in asm.c: convert_arg: (IX+-num) num argument was not expected to be an expression. test_number() <-> parse_expr() fixed! * BUG in asm.c: convert_arg: arg->label undefined! Default to false now fixed! * BUG in asm.c: lexical_analysis: overflow possible for 8-bit arguments in 1th pass if labels are used in expressions fixed! * BUG in asm.c: lexical_analysis: pseudo instructions I_EQU, I_DEFM, I_ORG, I_ALIGN also needs the current address as argument in pass 1 if it is a label fixed! * BUG in asm.c: lexical_analysis: parsing inside '..' was finished by delimiter (now new error message UNS introduced) fixed! * BUG in z80-mon.c: main: init_ctc() must be before reset_cpu() because set_cpu_pin() may call set_ctc_pin()! fixed! * BUG in execute.c: ix_iy_disp: _ushort a must be casted to signed char fixed! * BUG in execute.c: reg_str: in case A_PODLE_IX_PLUS, A_PODLE_IY_PLUS argument arg must be casted to signed char fixed! * in asm.c: if more than 4 bytes opcodes (e.g. DEFS) only the first 4 are shown in the assembler listing * in asm.c: new error message: Invalid character argument for invalid character tokens containing more than 1 (or none) character * in all places/files exchanged DEFM <--> DEFS (defs <--> defm). Historical DEFM is used to put messages (strings) in memory and DEFS is used to reserve storage (in memory) in Zilog Z80 assembler language