Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.32-05 candidate #1018

Merged
merged 13 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
name="Structorizer"
displayname="Structorizer"
identifier="lu.fisch.Structorizer"
shortversion="3.32-04"
version="3.32-04"
shortversion="3.32-05"
version="3.32-05"
icon="icons/Structorizer.icns"
mainclassname="Structorizer"
copyright="Bob Fisch"
Expand Down
105 changes: 33 additions & 72 deletions samples/export/ARM_gnu/ELIZA_2.3.txt
Original file line number Diff line number Diff line change
@@ -1,80 +1,42 @@
// Generated with Structorizer 3.32-04 on Tue Nov 02 16:07:47 CET 2021
// Generated with Structorizer 3.32-05 on Mon Nov 15 15:22:30 CET 2021
.global _start
.data
.align 2
v_15: .word '.',',',';','!','?'
v_2: .word '.',',',';','!','?'
.align 2
result: .word -1,0
.align 2
v_14: .word " i "," i\'"
v_1: .word " i "," i\'"
.align 2
v_13: .word 'P','l','e','a','s','e',' ','d','o','n',0x27,'t',' ','r','e','p','e','a','t',' ','y','o','u','r','s','e','l','f','!'
.align 2
v_12: .word 'H','i','!',' ','I',0x27,'m',' ','y','o','u','r',' ','n','e','w',' ','t','h','e','r','a','p','i','s','t','.',' ','M','y',' ','n','a','m','e',' ','i','s',' ','E','l','i','z','a','.',' ','W','h','a','t',0x27,'s',' ','y','o','u','r',' ','p','r','o','b','l','e','m','?'
.align 2
v_11: .word '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'
.align 2
v_10: .word '*',' ','(','R','e','q','u','i','r','e','s',' ','a','t',' ','l','e','a','s','t',' ','S','t','r','u','c','t','o','r','i','z','e','r',' ','3','.','3','0','-','0','3',' ','t','o',' ','r','u','n',')'
.align 2
v_9: .word '*',' ','V','e','r','s','i','o','n',':',' ','2','.','3',' ','(','2','0','2','0','-','0','2','-','2','4',')'
.align 2
v_8: .word '*',' ','-',' ','K','a','y',' ','G',0xfc,'r','t','z','i','g',' ','/',' ','F','H',' ','E','r','f','u','r','t',' ','2','0','1','6'
.align 2
v_7: .word '*',' ','A','d','a','p','t','e','d',' ','f','o','r',' ','S','t','r','u','c','t','o','r','i','z','e','r',' ','b','y'
.align 2
v_6: .word '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'
.align 2
v_5: .word '*',' ','-',' ','P','a','u','l',' ','H','a','s','h','f','i','e','l','d'
.align 2
v_4: .word '*',' ','-',' ','P','a','t','r','i','c','i','a',' ','D','a','n','i','e','l','s','o','n'
.align 2
v_3: .word '*',' ','A','d','a','p','t','e','d',' ','f','o','r',' ','B','a','s','i','c',' ','o','n',' ','I','B','M',' ','P','C',' ','b','y'
.align 2
v_2: .word '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'
.align 2
v_1: .word '*',' ','O','r','i','g','i','n','a','l',' ','d','e','s','i','g','n',' ','b','y',' ','J','.',' ','W','e','i','z','e','n','b','a','u','m'
.align 2
v_0: .word '*','*','*','*','*','*','*','*','*','*','*','*','*',' ','E','L','I','Z','A',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*'
v_0: .word 'P','l','e','a','s','e',' ','d','o','n',0x27,'t',' ','r','e','p','e','a','t',' ','y','o','u','r','s','e','l','f','!'
.text
.align 2
_start:
// Title information
LDR R2, =0xFF201000
ADR R3, v_0
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_1
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_2
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_3
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_4
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_5
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_6
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_7
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_8
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_9
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_10
STR R3, [R2]
LDR R2, =0xFF201000
ADR R3, v_11
STR R3, [R2]
// ERROR: Not implemented yet
// OUTPUT "************* ELIZA **************"
// ERROR: Not implemented yet
// OUTPUT "* Original design by J. Weizenbaum"
// ERROR: Not implemented yet
// OUTPUT "**********************************"
// ERROR: Not implemented yet
// OUTPUT "* Adapted for Basic on IBM PC by"
// ERROR: Not implemented yet
// OUTPUT "* - Patricia Danielson"
// ERROR: Not implemented yet
// OUTPUT "* - Paul Hashfield"
// ERROR: Not implemented yet
// OUTPUT "**********************************"
// ERROR: Not implemented yet
// OUTPUT "* Adapted for Structorizer by"
// ERROR: Not implemented yet
// OUTPUT "* - Kay Gürtzig / FH Erfurt 2016"
// ERROR: Not implemented yet
// OUTPUT "* Version: 2.3 (2020-02-24)"
// ERROR: Not implemented yet
// OUTPUT "* (Requires at least Structorizer 3.30-03 to run)"
// ERROR: Not implemented yet
// OUTPUT "**********************************"
// Stores the last five inputs of the user in a ring buffer,
// the second component is the rolling (over-)write index.
// ERROR: Not implemented yet
Expand Down Expand Up @@ -123,9 +85,8 @@ _start:
// offsets[length(keyMap)-1] <- 0
MOV R6, #0
// Starter
LDR R7, =0xFF201000
ADR R8, v_12
STR R8, [R7]
// ERROR: Not implemented yet
// OUTPUT "Hi! I\'m your new therapist. My name is Eliza. What\'s your problem?"
do_0:
LDR R7, =0xFF200050
LDR R7, [R7]
Expand Down Expand Up @@ -157,7 +118,7 @@ do_0:
CMP R6, #0
BNE end_1
then_1:
ADR R8, v_13
ADR R8, v_0
STMFD SP!, {LR}
STR R9, [SP,#-4]!
STR R7, [SP,#-4]!
Expand Down Expand Up @@ -244,7 +205,7 @@ adjustSpelling:
// while (position<=length(sentence))&&(copy(sentence,position,1)==" ")
// ERROR: Unsupported condition syntax - Alternative skipped!
// if (position<=length(sentence))
ADR R6, v_14
ADR R6, v_1
MOV R7, #0
for_5:
CMP R7, #1
Expand Down Expand Up @@ -365,7 +326,7 @@ normalizeInput:
LDR R2, [SP,#15,LSL #2]
// ERROR: Not implemented yet
// sentence <- lowercase(sentence)
ADR R4, v_15
ADR R4, v_2
MOV R5, #0
for_11:
CMP R5, #4
Expand Down
8 changes: 6 additions & 2 deletions samples/export/ARM_gnu/SORTING_TEST_MAIN.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated with Structorizer 3.32-04 on Tue Nov 02 18:02:13 CET 2021
// Generated with Structorizer 3.32-05 on Mon Nov 15 16:26:37 CET 2021
.global _start
.data
.text
Expand All @@ -10,6 +10,7 @@ do_0:
CMP R2, #1
BLT do_0
do_1:
// Prompt string of input instruction ignored
LDR R3, =0xFF200050
LDR R3, [R3]
CMP R3, #1
Expand Down Expand Up @@ -151,7 +152,7 @@ bubbleSort:
// ende <- length(values) - 2
do_5:
// The index of the most recent swapping (-1 means no swapping done).
MVN R3, #0xffffffff
MVN R3, #0x0
MOV R4, #0
for_6:
CMP R4, R5
Expand Down Expand Up @@ -238,7 +239,9 @@ while_8:
BGT else_9
then_9:
// Insert the seen element between smaller area and pivot element
ADR R5, values
STR R7, [R5, R2]
ADR R5, values
STR R6, [R5, R4]
// Shift the border between lower and undicovered area,
// update pivot position.
Expand All @@ -249,6 +252,7 @@ else_9:
// Insert the checked element between undiscovered and larger area
// ERROR: Not implemented yet
// values[start] <- values[stop]
ADR R5, values
STR R7, [R5, R3]
// Shift the border between undiscovered and larger area
SUB R3, R3, #1
Expand Down
28 changes: 14 additions & 14 deletions samples/export/ARM_keil/ELIZA_2.3.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Generated with Structorizer 3.32-04 on Tue Nov 02 16:08:50 CET 2021
; Generated with Structorizer 3.32-05 on Mon Nov 15 15:27:11 CET 2021
;AREA data, DATA, READWRITE
V_2 DCD '.',',',';','!','?'
result DCD -1,0
Expand All @@ -7,29 +7,29 @@ V_0 DCD 'P','l','e','a','s','e',' ','d','o','n',0x27,'t',' ','r','e','p','e','a'
;AREA text, CODE, READONLY

; Title information
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "************* ELIZA **************"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* Original design by J. Weizenbaum"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "**********************************"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* Adapted for Basic on IBM PC by"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* - Patricia Danielson"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* - Paul Hashfield"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "**********************************"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* Adapted for Structorizer by"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* - Kay Gürtzig / FH Erfurt 2016"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* Version: 2.3 (2020-02-24)"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "* (Requires at least Structorizer 3.30-03 to run)"
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "**********************************"
; Stores the last five inputs of the user in a ring buffer,
; the second component is the rolling (over-)write index.
Expand Down Expand Up @@ -79,7 +79,7 @@ V_0 DCD 'P','l','e','a','s','e',' ','d','o','n',0x27,'t',' ','r','e','p','e','a'
; offsets[length(keyMap)-1] <- 0
MOV R6, #0
; Starter
; ERROR: OUTPUT operation only supported with GNU code
; ERROR: Not implemented yet
; OUTPUT "Hi! I\'m your new therapist. My name is Eliza. What\'s your problem?"
do_0
; ERROR: INPUT operation only supported with GNU code
Expand Down
7 changes: 5 additions & 2 deletions samples/export/ARM_keil/SORTING_TEST_MAIN.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Generated with Structorizer 3.32-04 on Tue Nov 02 17:58:58 CET 2021
; Generated with Structorizer 3.32-05 on Mon Nov 15 16:27:06 CET 2021
;AREA data, DATA, READWRITE
;AREA text, CODE, READONLY

Expand Down Expand Up @@ -149,7 +149,7 @@ bubbleSort
; ende <- length(values) - 2
do_5
; The index of the most recent swapping (-1 means no swapping done).
MVN R3, 0xffffffff
MVN R3, 0x0
MOV R4, #0
for_6
CMP R4, R5
Expand Down Expand Up @@ -236,7 +236,9 @@ while_8
BGT else_9
then_9
; Insert the seen element between smaller area and pivot element
LDR R5, =values
STR R7, [R5, R2]
LDR R5, =values
STR R6, [R5, R4]
; Shift the border between lower and undicovered area,
; update pivot position.
Expand All @@ -247,6 +249,7 @@ else_9
; Insert the checked element between undiscovered and larger area
; ERROR: Not implemented yet
; values[start] <- values[stop]
LDR R5, =values
STR R7, [R5, R3]
; Shift the border between undiscovered and larger area
SUB R3, R3, #1
Expand Down
Loading