Skip to content

Commit 558f47d

Browse files
Added LOOPING and GOTO statements
Will add accurate timing and error diagram next patch v0.02 Stable Release Comping Up
1 parent c28a162 commit 558f47d

8 files changed

Lines changed: 217 additions & 26 deletions

File tree

include/command.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,16 @@
6161
#define fcheckfi 225
6262
#define scheckfi 255
6363

64+
65+
6466
// cls handling done by clear_terminal system routine.
67+
#define cbreak 137 //.break
68+
69+
#define cpool 46 // .pool
70+
#define endloopl 64
71+
#define endlooph 46
72+
#define fcheckloop 64
73+
#define scheckloop 46
6574

6675

6776
#endif //command_h

include/driver52.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ void uart_send(unsigned char);
99
void start_timer(void);
1010
void start_interrupts(void);
1111
void flush_inp_buffer(void);
12-
void timer_delay(void);
12+
1313

1414
#endif //driver52_h

include/handlers.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ static inline void hwport_handler(void);
3131

3232
static inline void copy_handler(void);
3333
static void fi_handler(void);
34-
34+
static void pool_handler(void);
3535
static void load_handler(void);
36+
static void break_handler(void);
37+
static inline void block_handler(void);
38+
static inline void goto_handler(void);
3639

3740

3841

include/ios.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ void print_program_entered_msg(void);
2121
void print_program_execution_msg(void);
2222

2323
void print_program_completed_msg(void);
24-
24+
void print_program_error_code(void);
2525
#endif //ios_h

include/parser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ static inline void assign_parser(void);
3131
static void dual_operand_line_parser(void); //increment //decrement //not //delete //print //assign
3232

3333
static inline void fi_parser(void);
34+
static inline void pool_parser(void);
3435

3536
static void if_parser(void);
3637
static inline void hwport_parser(void);

include/uvr_variable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ __bit __at(0x02) is_error;
5656
__bit __at(0x03) echo_e;
5757
__bit __at(0x04) is_success;
5858
__bit __at(0x05) machine_state;
59-
__bit __at(0x06) hardware_operation_input;
59+
__bit __at(0x06) is_looping;
6060
__bit __at(0x07) backspace_block;
6161
__bit __at(0x08) state_programming_enabled;
6262
__bit __at(0x09) is_requesting_syscall_access;

include/virtual_stack_manager.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
#define skip_addr 1
1313

1414

15+
16+
#define call_stack_limit 4
17+
#define block_seg 0
18+
19+
1520
static unsigned char fetch_data_variable(unsigned char);
1621
static void create_data_variable(unsigned char);
1722
static void assign_data_variable(unsigned char,unsigned char);
@@ -20,4 +25,8 @@ static unsigned char fetch_variable_slot(unsigned char);
2025

2126
static void reset_stack(void);
2227

28+
static unsigned char fetch_block_address(unsigned char);
29+
static void allocate_callable_block(unsigned char,unsigned char);
30+
static void delete_callable_block(unsigned char);
31+
2332
#endif //virtual_stack_manager_h

0 commit comments

Comments
 (0)