/* cli-core.S */
/*
This file is part of the AVR-Huffman.
- Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de)
+ Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/******************************************************************************/
/* uint16_t max_cmd_length(PGM_VOID_P cmdlist){
uint16_t t,ret=0;
- char* str;
+ char *str;
for(;;){
str = (char*)pgm_read_word(cmdlist);
cmdlist = (uint8_t*)cmdlist + CMDLIST_ENTRY_SIZE;
*/
TMP_CNT_0 = 26
TMP_CNT_1 = 27
+
.global max_cmd_length
max_cmd_length:
movw r30, r24
.asciz "\r\necho is o"
/******************************************************************************/
-/* int8_t search_and_call(char* cmd, uint16_t maxcmdlength, PGM_VOID_P cmdlist)
+/* int8_t search_and_call(char *cmd, uint16_t maxcmdlength, PGM_VOID_P cmdlist)
* param cmd: r24:r25
* param maxcmdlength: r22:r23
* param cmdlist: r20:r21
.asciz "\r\ncommand not found, try 'help'"
/******************************************************************************/
-/* void cli_option_listing(char* buffer, PGM_VOID_P cmdlist)
+/* void cli_option_listing(char *buffer, PGM_VOID_P cmdlist)
* param buffer: r24:r25
* param cmdlist: r22:r23
*/
movw TMP_0, r24
rcall cli_putstr_P
movw r24, TMP_0
- call strlen_P
+ call strlen_PF
movw TMP_0, LEN_0
sub TMP_0, r24
sbc TMP_1, r25
99:
pop_range 28, 29
pop_range 14, 17
+ ori r24, 1
ret
ahelphead_str:
.asciz "\r\n[auto help] available commands:\r\n <command> - <params> - <address>\r\n"