Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
mva #$00 I
l_0054
lda I
cmp #$10
jcs l_0062
lda #$00
sta :STACKORIGIN+STACKWIDTH+9
lda I
asl @
rol :STACKORIGIN+STACKWIDTH+9
add MONSTER
sta :TMP
lda MONSTER+1
adc :STACKORIGIN+STACKWIDTH+9
sta :TMP+1
ldy #$00
mva (:TMP),y :bp2
iny
mva (:TMP),y :bp2+1
ldy #$00
lda I
sta (:bp2),y
sta :STACKORIGIN+9
lda #$00
asl :STACKORIGIN+9
rol @
sta :STACKORIGIN+STACKWIDTH+9
lda I
asl @
lda MONSTER
add :STACKORIGIN+9
sta :TMP
lda MONSTER+1
adc :STACKORIGIN+STACKWIDTH+9
sta :TMP+1
mva (:TMP),y :bp2
iny
mva (:TMP),y :bp2+1
iny
lda :eax
sta (:bp2),y
inc I
jne l_0054
l_0062
type
monsters = record x,y: byte end;
var
monster: array [0..15] of ^monsters;
i: byte;
begin
for i:=0 to High(monster) do begin
monster[i].x := i;
monster[i].y := i * 2;
end;
end.
crrn:
po prostu leci sobie w tle a jak uwagę przykuje jakieś jego słowo to przełączam i słucham...type
monsters = record x,y: byte end;
var
monster: array [0..15] of ^monsters;
i: byte;
tmp: ^monsters;
begin
for i:=0 to High(monster) do begin
tmp:=monster[i];
tmp.x := i;
tmp.y := i * 2;
end;
lda I
cmp #$10
jcs l_007A
asl @
tay
lda adr.MONSTER,y
sta TMP
lda adr.MONSTER+1,y
sta TMP+1
mwa TMP :bp2
ldy #TMP.X-DATAORIGIN
lda I
sta (:bp2),y
lda #$00
sta :eax+1
lda I
asl @
rol :eax+1
ldy #TMP.Y-DATAORIGIN
sta (:bp2),y
inc I
jne l_006C
l_007A
set_monsters: {
ldx #0
__b1:
cpx #NO_MONSTERS
bcc __b2
rts
__b2:
txa
sta monsters,x
txa
asl
sta monsters+OFFSET_STRUCT_MONSTER_Y,x
inx
jmp __b1
}
monsters: .fill SIZEOF_STRUCT_MONSTER, 0
crrn:
Aha nie kompilowało się z #pragma'mi więc je wywaliłem, ale doczytam jak ustawić zmienne na ZP.BYTE RTCLOCK=$14
PROC WAIT(BYTE FRAMES)
FRAMES==+RTCLOCK
WHILE FRAMES<>RTCLOCK DO OD
RETURN
20CE: EA NOP
20CF: 4C D2 20 JMP $20D2
20D2: 8D CE 20 STA $20CE
20D5: 18 CLC
20D6: AD CE 20 LDA $20CE
20D9: 65 14 ADC $14 ;RTCLOK+2
20DB: 8D CE 20 STA $20CE
20DE: AD CE 20 LDA $20CE
20E1: 45 14 EOR $14 ;RTCLOK+2
20E3: D0 03 BNE $20E8
20E5: 4C EB 20 JMP $20EB
20E8: 4C DE 20 JMP $20DE
20EB: 60 RTS
program test;
uses crt;
var rtClock: byte absolute 20;
procedure Wait(frames: byte);
begin
Inc(frames,rtClock);
while frames <> rtClock do;
end;
begin
Wait(10);
ReadKey;
end.
206C: E8 INX
206D: A9 0A LDA #$0A
206F: 95 9A STA $9A,X ;MVFA+1
2071: 20 55 20 JSR $2055
2055: B5 9A LDA $9A,X ;MVFA+1
2057: 8D 99 20 STA $2099
205A: CA DEX
205B: AD 99 20 LDA $2099
205E: 18 CLC
205F: 65 14 ADC $14 ;RTCLOK+2
2061: 8D 99 20 STA $2099
2064: AD 99 20 LDA $2099
2067: C5 14 CMP $14 ;RTCLOK+2
2069: D0 F9 BNE $2064
206B: 60 RTS
SET $E=$2000
SET $491=$2000
BYTE RTC2=$14,RTC1=$13
CARD FUNC GET_TIME()
CARD TIME
TIME=RTC1*256+RTC2
RETURN(TIME)
PROC WAIT(CARD FRAMES)
FRAMES==+GET_TIME()
WHILE FRAMES<>GET_TIME() DO OD
RETURN
PROC MAIN()
WAIT(1000)
RETURN
2000: 00 BRK
2001: 00 BRK
2002: 4C 05 20 JMP $2005 ;GET_TIME
2005: A9 01 LDA #$01
2007: 85 85 STA $85 ;VNTD+1
2009: A9 00 LDA #$00
200B: 85 84 STA $84 ;VNTD
200D: A5 13 LDA $13 ;RTCLOK+1
200F: A2 00 LDX #$00
2011: 20 37 9D JSR $9D37
2014: 85 AE STA $AE ;LELNUM+1
2016: 8A TXA
2017: 85 AF STA $AF ;STENUM
2019: 18 CLC
201A: A5 AE LDA $AE ;LELNUM+1
201C: 65 14 ADC $14 ;RTCLOK+2
201E: 8D 00 20 STA $2000
2021: A5 AF LDA $AF ;STENUM
2023: 69 00 ADC #$00
2025: 8D 01 20 STA $2001
2028: AD 01 20 LDA $2001
202B: 85 A1 STA $A1 ;TSLNUM+1
202D: AD 00 20 LDA $2000
2030: 85 A0 STA $A0 ;TSLNUM
2032: 60 RTS
2033: 00 BRK
2034: 00 BRK
2035: 4C 38 20 JMP $2038 ;WAIT
2038: 8E 34 20 STX $2034
203B: 8D 33 20 STA $2033
203E: 20 02 20 JSR $2002
2041: 18 CLC
2042: AD 33 20 LDA $2033
2045: 65 A0 ADC $A0 ;TSLNUM
2047: 8D 33 20 STA $2033
204A: AD 34 20 LDA $2034
204D: 65 A1 ADC $A1 ;TSLNUM+1
204F: 8D 34 20 STA $2034
2052: 20 02 20 JSR $2002
2055: AD 33 20 LDA $2033
2058: 45 A0 EOR $A0 ;TSLNUM
205A: D0 05 BNE $2061
205C: 0D 34 20 ORA $2034
205F: 45 A1 EOR $A1 ;TSLNUM+1
2061: D0 03 BNE $2066
2063: 4C 69 20 JMP $2069
2066: 4C 52 20 JMP $2052
2069: 60 RTS
206A: 4C 6D 20 JMP $206D ;MAIN
206D: A2 03 LDX #$03
206F: A9 E8 LDA #$E8
2071: 20 35 20 JSR $2035
2074: 60 RTS
2075: 60 RTS
Gury:
This is new version of Effectus, done from scratch. It is very different from previous versions, because I took new approach to generate code. It is kind of a new branch of Effectus. Currently only Windows platform is supported, but other platforms will be supported later.