SHENZHEN I/O

SHENZHEN I/O

评价数不足
Data packet reversal
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
5.573 KB
2024 年 8 月 17 日 上午 9:04
1 项改动说明 ( 查看 )

订阅以下载
Data packet reversal

描述
Your task is to reverse the 3-sized X-Bus data packets from dataIn to dataOut.
This puzzle is actually easy to complete, even if it doesn't seem so to some.
If you have some feedback, feel free to give any comments in the thread!

Developer's best:
¥5 cost, 115 power, 6 lines of code

Hints:

#1
Use an MC6000 chip and a 100P-14. Connect the parts and write the code. The code and an almost identical design can be found in the manual for the 100P-14.

#2
Use an MC6000 chip. Move the first and second value to registers, and the third directly from dataIn to dataOut. Then, move the other two values. This code cannot be found anywhere in the manual, but is very easy to write.

Solution
MC6000) Plug x0 into dataIn and x1 into dataOut. Write following code: slx x0 // mov x0 dat // mov x0 acc // mov x0 x1 // mov acc x1 // mov dat x1

Szuetam
6 条留言
HansDampf 2024 年 12 月 12 日 上午 4:54 
Thank you! Your 5/115/6 -Solution was quite obvious ;-)
Garrett33 2024 年 10 月 19 日 下午 12:39 
you helped me find the error - it was a typo - i wrote 'slp x0'
Szuetam2  [作者] 2024 年 10 月 19 日 上午 11:40 
I checked my solution again and it worked, so I'll put it up in the description for you. Hope it works this time!
Garrett33 2024 年 10 月 19 日 上午 1:55 
well i know that and I did that. my problem starts after i received and sent the first packet - how to advance to the next packet ? in riddles where on silent ticks no packet is sent, they often send -999 as dummy - if not then usually i can wait for the next packet with 'SLX X0' - but for some reason that does not work here - in fact I even wonder how you did it yourself
. . .
Szuetam2  [作者] 2024 年 10 月 18 日 下午 1:04 
I might know what's wrong, and it's pretty obvious when you see it, but did you notice that the 3 data values arrive at once? For XBus, multiple values can be inputted on one time unit, which is indicated by the little arrow. This applies to both dataIn and dataOut in this scenario, which simply means that you have to receive 3 numbers and output 3 numbers as well (just in reversed order). Hope that helps!
Garrett33 2024 年 10 月 18 日 上午 3:02 
i don't know how to advance to the next input after processing the first packet - it always hangs.

if I use 'SLP X0' - I get 'Part not sleeping' there.

If I use
. SLP 1
. MOV X0 ACC
I get 'Part not sleeping' on the 'MOV Line