emu8051.git
10 years agoFix regression with ADDC instruction
Hugo Villeneuve [Fri, 3 Jan 2014 06:32:19 +0000 (01:32 -0500)]
Fix regression with ADDC instruction

Introduced when refactoring code with psw_set_ov() function.

10 years agoAdd additional compile warning flags
Hugo Villeneuve [Fri, 3 Jan 2014 06:56:37 +0000 (01:56 -0500)]
Add additional compile warning flags

Also changed way that warning flags are defined in autoconf files.

10 years agoMove git ignore file list to build-aux
Hugo Villeneuve [Wed, 11 Dec 2013 04:05:32 +0000 (23:05 -0500)]
Move git ignore file list to build-aux

10 years agoRemove configure cache directory after running autoreconf
Hugo Villeneuve [Wed, 11 Dec 2013 03:34:09 +0000 (22:34 -0500)]
Remove configure cache directory after running autoreconf

10 years agoSeparate cli and gtk sources into separate directories
Hugo Villeneuve [Sat, 7 Dec 2013 23:48:25 +0000 (18:48 -0500)]
Separate cli and gtk sources into separate directories

Also added a common directory to hold common files to both interfaces,
and compiled into a static library.

10 years agoRemove obsolescent macro AM_PROG_CC_C_O
Hugo Villeneuve [Sat, 7 Dec 2013 23:50:39 +0000 (18:50 -0500)]
Remove obsolescent macro AM_PROG_CC_C_O

10 years agoImprove interrupt trigger code readability
Anthony Liu [Thu, 5 Dec 2013 15:59:42 +0000 (23:59 +0800)]
Improve interrupt trigger code readability

10 years agoFix bug when processing interrupts
Anthony Liu [Thu, 5 Dec 2013 15:48:36 +0000 (23:48 +0800)]
Fix bug when processing interrupts

Push current PC onto stack and take vector address from parameter.

10 years agoAdd support for as504 assembler, with output file option
Hugo Villeneuve [Tue, 3 Dec 2013 02:59:30 +0000 (21:59 -0500)]
Add support for as504 assembler, with output file option

Patch is available here:
http://www.hugovil.com/repository/hvlinux/patches/as504-add-output-file-option.patch

This patch is usefull because it fixes a bug when testing the distribution
in a  separate build directory like when using:
    make distcheck

configure.ac automatically detects if as504 supports the option.

10 years agoAdd support for as504 assembler
Hugo Villeneuve [Tue, 3 Dec 2013 02:18:44 +0000 (21:18 -0500)]
Add support for as504 assembler

10 years agoFix bug when using separate build directory to create symbolic link
Hugo Villeneuve [Mon, 2 Dec 2013 04:33:18 +0000 (23:33 -0500)]
Fix bug when using separate build directory to create symbolic link

10 years agoReplace CALL by LCALL for compatibility with AS31 and AS504 assemblers
Hugo Villeneuve [Mon, 2 Dec 2013 04:31:51 +0000 (23:31 -0500)]
Replace CALL by LCALL for compatibility with AS31 and AS504 assemblers

10 years agoRemove CSEG directive for compatibility with AS31 and AS504 assemblers
Hugo Villeneuve [Mon, 2 Dec 2013 04:02:09 +0000 (23:02 -0500)]
Remove CSEG directive for compatibility with AS31 and AS504 assemblers

10 years agoRemove currently unsupported option to set iram size
Hugo Villeneuve [Mon, 2 Dec 2013 02:20:49 +0000 (21:20 -0500)]
Remove currently unsupported option to set iram size

10 years agoFix CPPFLAGS for each target (CLI and GTK)
Hugo Villeneuve [Thu, 28 Nov 2013 04:02:18 +0000 (23:02 -0500)]
Fix CPPFLAGS for each target (CLI and GTK)

10 years agoChange way tests are enabled/disabled by asem presence
Hugo Villeneuve [Mon, 2 Dec 2013 01:06:29 +0000 (20:06 -0500)]
Change way tests are enabled/disabled by asem presence

10 years agoRun each test separately from single shell script
Hugo Villeneuve [Fri, 29 Nov 2013 04:11:43 +0000 (23:11 -0500)]
Run each test separately from single shell script

Each new test is simply a link to opcodes.sh, generatated automatically.

10 years agoMove timer functions to timers.c
Hugo Villeneuve [Thu, 28 Nov 2013 01:56:05 +0000 (20:56 -0500)]
Move timer functions to timers.c

10 years agoAdd tests for timers mode 2
Hugo Villeneuve [Thu, 28 Nov 2013 01:55:21 +0000 (20:55 -0500)]
Add tests for timers mode 2

10 years agoChange test output expected string layout
Hugo Villeneuve [Wed, 27 Nov 2013 05:17:30 +0000 (00:17 -0500)]
Change test output expected string layout

Also check stack pointer value for all tests

10 years agoAdd tests for timers mode 0
Hugo Villeneuve [Wed, 27 Nov 2013 05:16:45 +0000 (00:16 -0500)]
Add tests for timers mode 0

10 years agoFix bug with timers mode 0 (8 bits with 5-bit prescaler)
Hugo Villeneuve [Wed, 27 Nov 2013 05:09:40 +0000 (00:09 -0500)]
Fix bug with timers mode 0 (8 bits with 5-bit prescaler)

10 years agoAdd tests for timers mode 1
Hugo Villeneuve [Wed, 27 Nov 2013 04:38:36 +0000 (23:38 -0500)]
Add tests for timers mode 1

10 years agoFix error with timer1 being written to timer0
Hugo Villeneuve [Wed, 27 Nov 2013 03:54:08 +0000 (22:54 -0500)]
Fix error with timer1 being written to timer0

10 years agoAdd PC check for all tests
Hugo Villeneuve [Wed, 27 Nov 2013 04:39:17 +0000 (23:39 -0500)]
Add PC check for all tests

10 years agoAdd tests for MOV instruction
Hugo Villeneuve [Mon, 25 Nov 2013 04:20:18 +0000 (23:20 -0500)]
Add tests for MOV instruction

10 years agoAdd tests for DIV instruction
Hugo Villeneuve [Mon, 25 Nov 2013 04:14:46 +0000 (23:14 -0500)]
Add tests for DIV instruction

10 years agoAdd tests for ANL instruction
Hugo Villeneuve [Mon, 25 Nov 2013 04:08:26 +0000 (23:08 -0500)]
Add tests for ANL instruction

10 years agoAdd tests for ORL instruction
Hugo Villeneuve [Mon, 25 Nov 2013 04:02:31 +0000 (23:02 -0500)]
Add tests for ORL instruction

10 years agoAdd framework for regression testing
Hugo Villeneuve [Sun, 24 Nov 2013 21:04:30 +0000 (16:04 -0500)]
Add framework for regression testing

10 years agoAutomatic generation of test hex files
Hugo Villeneuve [Sun, 24 Nov 2013 05:10:14 +0000 (00:10 -0500)]
Automatic generation of test hex files

10 years agoAdd tests for MUL instructions
Hugo Villeneuve [Sat, 23 Nov 2013 18:58:37 +0000 (13:58 -0500)]
Add tests for MUL instructions

10 years agoRemove hex files
Hugo Villeneuve [Sat, 23 Nov 2013 18:57:48 +0000 (13:57 -0500)]
Remove hex files

10 years agoRename test-files directory -> tests
Hugo Villeneuve [Sat, 23 Nov 2013 18:56:54 +0000 (13:56 -0500)]
Rename test-files directory -> tests

10 years agoAdd automake options -Wall and gnu std-options
Hugo Villeneuve [Mon, 2 Dec 2013 01:43:19 +0000 (20:43 -0500)]
Add automake options -Wall and gnu std-options

Remove configure verbose output

10 years agoRemove superfluous bytes in program disassembly
Hugo Villeneuve [Mon, 25 Nov 2013 01:39:30 +0000 (20:39 -0500)]
Remove superfluous bytes in program disassembly

Sometimes, B1 and B2 were showing old values from previous disassembly.
Now explicitly remove them for each disassembly line.

10 years agoFix code indentation
Hugo Villeneuve [Mon, 25 Nov 2013 01:35:11 +0000 (20:35 -0500)]
Fix code indentation

10 years agoPrevent dissassembling instructions past last address
Hugo Villeneuve [Mon, 25 Nov 2013 00:23:57 +0000 (19:23 -0500)]
Prevent dissassembling instructions past last address

10 years agoAdd ignore files to gitignore
Hugo Villeneuve [Mon, 25 Nov 2013 00:06:50 +0000 (19:06 -0500)]
Add ignore files to gitignore

10 years agoFix syntax error in comments
Hugo Villeneuve [Mon, 25 Nov 2013 00:03:54 +0000 (19:03 -0500)]
Fix syntax error in comments

10 years agoFix error with EM command in CLI mode
Hugo Villeneuve [Sun, 1 Dec 2013 22:00:04 +0000 (17:00 -0500)]
Fix error with EM command in CLI mode

Address parameter was not handled correctly.

10 years agoCLI version: Add <?> to display help menu
Hugo Villeneuve [Sun, 1 Dec 2013 21:27:53 +0000 (16:27 -0500)]
CLI version: Add <?> to display help menu

10 years agoReintroduce PSW in list of displayed registers (for regression tests)
Hugo Villeneuve [Sun, 24 Nov 2013 21:01:21 +0000 (16:01 -0500)]
Reintroduce PSW in list of displayed registers (for regression tests)

10 years agoDisplay SFR registers one per line in automatic run mode
Hugo Villeneuve [Sun, 24 Nov 2013 19:55:11 +0000 (14:55 -0500)]
Display SFR registers one per line in automatic run mode

10 years agoMove SFR read/write functions to new file sfr.c
Hugo Villeneuve [Sun, 24 Nov 2013 19:39:18 +0000 (14:39 -0500)]
Move SFR read/write functions to new file sfr.c

10 years agoAdd option to automatically run and stop CLI emulator
Hugo Villeneuve [Sun, 24 Nov 2013 18:15:00 +0000 (13:15 -0500)]
Add option to automatically run and stop CLI emulator

10 years agoReplace printf statements with log functions
Hugo Villeneuve [Sun, 24 Nov 2013 18:11:27 +0000 (13:11 -0500)]
Replace printf statements with log functions

10 years agoMove variable declaration before statements
Hugo Villeneuve [Sun, 24 Nov 2013 18:08:42 +0000 (13:08 -0500)]
Move variable declaration before statements

10 years agoDisplay filename in case of HEX file load error
Hugo Villeneuve [Sun, 24 Nov 2013 18:03:16 +0000 (13:03 -0500)]
Display filename in case of HEX file load error

10 years agoZero all memories when initializing program
Hugo Villeneuve [Sat, 23 Nov 2013 04:42:14 +0000 (23:42 -0500)]
Zero all memories when initializing program

This is especially usefull to have NOP in program memory.

10 years agoAdd grid lines to PSW window
Hugo Villeneuve [Sat, 23 Nov 2013 01:11:21 +0000 (20:11 -0500)]
Add grid lines to PSW window

10 years agoAdd PSW sub window
Hugo Villeneuve [Thu, 21 Nov 2013 04:58:31 +0000 (23:58 -0500)]
Add PSW sub window

10 years agoUse macro to set name of sub window
Hugo Villeneuve [Thu, 21 Nov 2013 04:57:55 +0000 (23:57 -0500)]
Use macro to set name of sub window

10 years agoChange scope of local variable to static
Hugo Villeneuve [Thu, 21 Nov 2013 04:56:46 +0000 (23:56 -0500)]
Change scope of local variable to static

10 years agoAdd option to display bool hex character
Hugo Villeneuve [Thu, 21 Nov 2013 04:55:41 +0000 (23:55 -0500)]
Add option to display bool hex character

10 years agoAdd PSW generic bit write/read functions
Hugo Villeneuve [Thu, 21 Nov 2013 04:27:37 +0000 (23:27 -0500)]
Add PSW generic bit write/read functions

10 years agoAdd parity bit update each instruction cycle
Hugo Villeneuve [Mon, 18 Nov 2013 03:52:00 +0000 (22:52 -0500)]
Add parity bit update each instruction cycle

10 years agoAdd function to read 16-bit address/offset/value from pgm memory
Hugo Villeneuve [Mon, 18 Nov 2013 00:48:05 +0000 (19:48 -0500)]
Add function to read 16-bit address/offset/value from pgm memory

10 years agoFix bug with MOV DPTR,#data16 instruction
Hugo Villeneuve [Mon, 18 Nov 2013 00:52:46 +0000 (19:52 -0500)]
Fix bug with MOV DPTR,#data16 instruction

Source variable was 8 bits instead of 16 bits.

10 years agoRemove unused destination adressing mode #data16
Hugo Villeneuve [Mon, 18 Nov 2013 00:50:28 +0000 (19:50 -0500)]
Remove unused destination adressing mode #data16

Even if it is required, the destination variable is only 8-bits,
so this would have been a potential bug.

10 years agoMake MUL and DIV use generic source/destination variables
Hugo Villeneuve [Sun, 17 Nov 2013 23:48:26 +0000 (18:48 -0500)]
Make MUL and DIV use generic source/destination variables

To remove confusing commented code and compilation warning

10 years agoRefactor perl code to write C source code line
Hugo Villeneuve [Sun, 17 Nov 2013 23:16:56 +0000 (18:16 -0500)]
Refactor perl code to write C source code line

10 years agoRefactor perl code to write file header
Hugo Villeneuve [Sun, 17 Nov 2013 22:51:56 +0000 (17:51 -0500)]
Refactor perl code to write file header

10 years agoAdd overflow and auxiliary carry flags manipulation functions
Hugo Villeneuve [Sun, 17 Nov 2013 22:02:10 +0000 (17:02 -0500)]
Add overflow and auxiliary carry flags manipulation functions

10 years agoSimplify carry bit set/clr functions
Hugo Villeneuve [Sun, 17 Nov 2013 21:19:52 +0000 (16:19 -0500)]
Simplify carry bit set/clr functions

10 years agoAdd carry bit definitions
Hugo Villeneuve [Sun, 17 Nov 2013 19:29:25 +0000 (14:29 -0500)]
Add carry bit definitions

10 years agoMove PSW bit manipulation functions to psw.c
Hugo Villeneuve [Sun, 17 Nov 2013 19:03:12 +0000 (14:03 -0500)]
Move PSW bit manipulation functions to psw.c

10 years agoAdd carry flag manipulation functions
Hugo Villeneuve [Sun, 17 Nov 2013 18:47:20 +0000 (13:47 -0500)]
Add carry flag manipulation functions

10 years agoAdd stack push/pop functions
Hugo Villeneuve [Sat, 16 Nov 2013 19:22:20 +0000 (14:22 -0500)]
Add stack push/pop functions

10 years agoAdd DPTR read/write functions
Hugo Villeneuve [Mon, 11 Nov 2013 04:16:33 +0000 (23:16 -0500)]
Add DPTR read/write functions

10 years agoAdd comment about reset value of stack pointer
Hugo Villeneuve [Sat, 16 Nov 2013 21:39:51 +0000 (16:39 -0500)]
Add comment about reset value of stack pointer

10 years agoFix error with ADD instruction and AC bit
Hugo Villeneuve [Sun, 17 Nov 2013 22:03:19 +0000 (17:03 -0500)]
Fix error with ADD instruction and AC bit

The overflow bit was written instead of the auxiliary carry bit.

10 years agoFix bug with ANL instruction
Hugo Villeneuve [Sun, 17 Nov 2013 20:18:19 +0000 (15:18 -0500)]
Fix bug with ANL instruction

10 years agoFix bug with ORL instruction
Hugo Villeneuve [Sun, 17 Nov 2013 20:08:39 +0000 (15:08 -0500)]
Fix bug with ORL instruction

10 years agoFix error with JMP @A,DPTR instruction
Hugo Villeneuve [Mon, 4 Nov 2013 15:27:10 +0000 (10:27 -0500)]
Fix error with JMP @A,DPTR instruction

The resulting jump address is simply the sum of the values in the accumulator
and the DPTR registers, not the indirect read of that sum.

Error reported and fixed by Anthony (antliu at gmail.com).

10 years agoFix error with RETI instruction
Hugo Villeneuve [Mon, 4 Nov 2013 15:16:04 +0000 (10:16 -0500)]
Fix error with RETI instruction

The stack pointer was not updated correctly.

Error reported and fixed by Anthony (antliu at gmail.com).

10 years agoAdd view menu option to view/hide SFR memory dump window
Hugo Villeneuve [Thu, 31 Oct 2013 00:51:11 +0000 (20:51 -0400)]
Add view menu option to view/hide SFR memory dump window

10 years agoAdd support to view/hide SFR memory dump window in config file
Hugo Villeneuve [Thu, 31 Oct 2013 00:49:21 +0000 (20:49 -0400)]
Add support to view/hide SFR memory dump window in config file

10 years agoUpdate TODO
Hugo Villeneuve [Thu, 10 Oct 2013 01:10:10 +0000 (21:10 -0400)]
Update TODO

10 years agoRefactor code to create memory windows
Hugo Villeneuve [Thu, 31 Oct 2013 01:41:09 +0000 (21:41 -0400)]
Refactor code to create memory windows

10 years agoRefactor log functions
Hugo Villeneuve [Mon, 28 Oct 2013 04:13:14 +0000 (00:13 -0400)]
Refactor log functions

10 years agoAdd option to specify maximum pgm memory size
Hugo Villeneuve [Mon, 28 Oct 2013 02:46:52 +0000 (22:46 -0400)]
Add option to specify maximum pgm memory size

10 years agoRefactor code to read/write different memory types
Hugo Villeneuve [Mon, 28 Oct 2013 02:48:24 +0000 (22:48 -0400)]
Refactor code to read/write different memory types

Dynamic memory buffers allocation depending on sizes specified with command-line
options.

Add future support for separate IRAM and SFR buffers.

10 years agoRename macros for maximum memory sizes
Hugo Villeneuve [Mon, 28 Oct 2013 02:28:03 +0000 (22:28 -0400)]
Rename macros for maximum memory sizes

10 years agoLimit default external memory size to 1024 bytes
Hugo Villeneuve [Mon, 28 Oct 2013 02:26:43 +0000 (22:26 -0400)]
Limit default external memory size to 1024 bytes

Emulator is running very slow if external memory is at its maximum of 64K.

10 years agoFix syntax error in comment
Hugo Villeneuve [Fri, 25 Oct 2013 01:25:54 +0000 (21:25 -0400)]
Fix syntax error in comment

10 years agoDo not reset emulator on file load (no ram clear)
Hugo Villeneuve [Thu, 24 Oct 2013 03:32:00 +0000 (23:32 -0400)]
Do not reset emulator on file load (no ram clear)

Reset only when loading first file at application startup.

10 years agoAdd Timers 0 and 1 to SFR window
Hugo Villeneuve [Thu, 24 Oct 2013 03:07:34 +0000 (23:07 -0400)]
Add Timers 0 and 1 to SFR window

10 years agoAdd option to specify maximum memory sizes
Hugo Villeneuve [Wed, 23 Oct 2013 03:16:35 +0000 (23:16 -0400)]
Add option to specify maximum memory sizes

10 years agoAdd view menu option to enable/disable IRAM/XRAM windows
Hugo Villeneuve [Wed, 23 Oct 2013 02:56:02 +0000 (22:56 -0400)]
Add view menu option to enable/disable IRAM/XRAM windows

10 years agoAdd view menu option for selecting bits per row (8/16)
Hugo Villeneuve [Tue, 22 Oct 2013 03:04:16 +0000 (23:04 -0400)]
Add view menu option for selecting bits per row (8/16)

10 years agoAdd support for bits per row in config file
Hugo Villeneuve [Tue, 22 Oct 2013 02:57:28 +0000 (22:57 -0400)]
Add support for bits per row in config file

Also add support for viewing internal and external memory windows
in config file.

These 3 new variables are not yet connected (TODO).

10 years agoAdd live option to change windows layout
Hugo Villeneuve [Tue, 22 Oct 2013 02:36:40 +0000 (22:36 -0400)]
Add live option to change windows layout

Restart UI when changing layout. This is working, altough the main window
temporarily disapear in doing so.

10 years agoUse fixed font for ASCII column
Hugo Villeneuve [Mon, 21 Oct 2013 02:18:53 +0000 (22:18 -0400)]
Use fixed font for ASCII column

10 years agoAlign memory data columns text on left side
Hugo Villeneuve [Mon, 21 Oct 2013 02:12:19 +0000 (22:12 -0400)]
Align memory data columns text on left side

10 years agoAdjust memory index column header according to number of data columns
Hugo Villeneuve [Mon, 21 Oct 2013 02:09:50 +0000 (22:09 -0400)]
Adjust memory index column header according to number of data columns

10 years agoHarmonize windows refresh function names
Hugo Villeneuve [Mon, 21 Oct 2013 01:46:07 +0000 (21:46 -0400)]
Harmonize windows refresh function names

10 years agoSave vpane position for memory windows
Hugo Villeneuve [Mon, 21 Oct 2013 01:33:40 +0000 (21:33 -0400)]
Save vpane position for memory windows

10 years agoAdd external memory window vpaned_mem
Hugo Villeneuve [Mon, 21 Oct 2013 01:13:22 +0000 (21:13 -0400)]
Add external memory window vpaned_mem

10 years agoConvert memwin to display internal or external memory
Hugo Villeneuve [Mon, 21 Oct 2013 00:44:56 +0000 (20:44 -0400)]
Convert memwin to display internal or external memory