Schrijver
| Free your creativity - IOMBCC
|
manuel msx guru Berichten: 3188 | Geplaatst: 09 April 2005, 08:52   |
NYYRIKKI: ehm, totally unreadable... Wasn't that the idea of obfuscation? ANyway, it will get you guys loads of extra space, that was the idea. Not just because it is possible.
|
|
NYYRIKKI msx master Berichten: 1463 | Geplaatst: 14 April 2005, 14:34   |
Here is yet another entry...
This program can be used to change CPU mode on MSX tR.
3608 DEFUSR=-32749:IFUSR(0)THENLINE>2COPY0&H80F6OR384BASE!!
Change number after "LINE>" like this:
0 = Z80 (ROM)
1 = R800 (ROM)
2 = R800 (DRAM)
This program has also another special feature... If you save this program with .COM extention, you can use it on MSX-DOS as well.
Example:
SAVE"R800.COM"
_SYSTEM
R800
|
|
NYYRIKKI msx master Berichten: 1463 | Geplaatst: 14 April 2005, 15:13   |
Here is version, that should not give me minus points as it works from any address... 8728 DEFUSR=38+PEEK(-2442)+PEEK(-2441)*256:IFUSR(0)THENLINE>2COPY0&H80F6OR384BASE!! |
|
Arjan msx addict Berichten: 437 | Geplaatst: 14 April 2005, 16:59   |
Hehe, I was just thinking you wouldn't get any bonus points but then you came up with an even more insane version  |
|
manuel msx guru Berichten: 3188 | Geplaatst: 14 April 2005, 19:42   |
/me drops his jaw to on the floor...
|
|
dvik msx master Berichten: 1262 | Geplaatst: 14 April 2005, 20:00   |
My MSX started to smell funny after I ran your entry  |
|
NYYRIKKI msx master Berichten: 1463 | Geplaatst: 15 April 2005, 12:05   |
Ok, here is the latest version
8728 DEFUSR=38+PEEK(-2442)+PEEK(-2441)*256:IFUSR(0)THENLINE>2COPY0&H80F6OR384ALLYOURBASEAREBELONGTOUS! Dvik: You really should not eat on top of your MSX
|
|
Sonic_aka_T
 msx guru Berichten: 2245 | Geplaatst: 15 April 2005, 14:52   |
hehe ^_^
|
|
snout
 msx legend Berichten: 4981 | Geplaatst: 15 April 2005, 19:10   |
Say euhm.. Nyrikki... could you explain how the $#%*&$* this works? I'm clueless  |
|
Guillian msx professional Berichten: 585 | Geplaatst: 15 April 2005, 21:00   |
I think he reads the pointer to the basic program (#f676 + 256*#f677), then add a offset of 38 bytes(used by the real basic program) and then executes a clever Z80 code defined with BASIC tokens and data.
|
|
dvik msx master Berichten: 1262 | Geplaatst: 15 April 2005, 21:14   |
Yes it isn't really an MSX basic program. It is just a reverse basic of a small program that sets the CPU mode. Asembler code is usually not allowed in basic contests so I doubt that this entry would count although the idea is brilliant and the entry looks very good
|
|
NYYRIKKI msx master Berichten: 1463 | Geplaatst: 17 April 2005, 05:23   |
I'll explain...
In DOS the BASIC header, lenght of the line and line number cause following program appear:
RST #38 ; Just a fake interrupt
LD C,B
LD A,B
JR #127 ; This is the address where actual program will be loaded in DOS
DEFUSR=38+PEEK(-2442)+PEEK(-2441)*256:IFUSR(0)THEN
This is pure BASIC. Because this program does not change the output of USR, 0 will be returned back and as we know 0 = False, so rest of the line will not be executed in BASIC.
THENLINE>2COPY0&H80F6OR384
This is the ML program, in assembler it would look like this:
XOR A
XOR #13
SUB #11
INC C
OR #80
RST #30
DB #1C ; A bit weird looking Slot ID, but it works as bits 0,1 and 7 are 0
DW #180
ALLYOURBASEAREBELONGTOUS!
 Just "BASE" is important here (RET) rest is just pure humor
Ps. Dvik: Assembler is allowed in this compo (rules are on page 1)
|
|
dvik msx master Berichten: 1262 | Geplaatst: 17 April 2005, 06:54   |
Thanks for the explanation, I ran the program in a debugger and got the assembler listing and kindof figured out how it worked.
It is a very clever program and I like it a lot (and I missed the asm rule, sorry)
|
|
snout
 msx legend Berichten: 4981 | Geplaatst: 17 April 2005, 13:29   |
dvik/Nyyrikki - Can we expect more updates to Rally-X?  |
|
manuel msx guru Berichten: 3188 | Geplaatst: 17 April 2005, 15:48   |
(never mind...)
|
|
|
|
|