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.
Zbyti:
@Kaz moglibyście wrzucić to też w postaci gotowej do użycia we własnym programie? Nie znam G2F, do tego jest on Windows Only.Vidol:
To ja dorzuce swoje 2 grosze na temat optymalizacji obrazkow g2fSET $E=$2000
SET $491=$2000
4.3 Using Large Assembly Language Modules
-----------------------------------------
Since you can direct Action!'s code generation, you can obviously
"tell" it to reserve any given area of memory. This implies that you
may assemble code for some specific address range, make a list of the subroutine entry points and/or variables to be accessed from Action!, and compile an Action! program which avoids the assembly language area. If the Action! program equates PROCedures, FUNCtions, and variable names to locations within this area, the assembly language routines, etc., may be used interchangeably with Action! routines.
Here is a small example of what we are discussing:
Assembly language:
*=$3000
LSH3 ; FUNCTION: left shift argument by 3
ASL A
ASL A
ASL A ; left shift 3 times
STA $A0 ; put where Action! puts function
LDA #0 ; ...return values
STA $A1
RTS
masks .BYTE 1,2,4,8,l6,32,64,l28 ; set of bit masks
Action!:
BYTE FUNC LSH3=$3000 (BYTE N)
BYTE ARRAY MASK(0) = $300A
For this particular example, you would probably be better off putting the small routine and array directly in your Action! program, via code blocks. But for larger, more complex operations, etc., this technique is very workable.
mkolodziejski:
nawet można pokusić się o drobny artykuł na forum żeby zostało dla potomnych (i w wyszukiwarce).<div><a href="https://us02web.zoom.us/j/82561643485?pwd=ZVpCQXU4YjhQNHJ3Mm1DR3c3QUJyUT09"><img style="margin-left: 35px; margin-bottom: 20px;" src="./gfx/tdc-qr-code.png" alt="Warsztaty Action!" height="200" width="200">
</div>
SET $E=$2000
SET $491=$2000
SET $E=$2000
SET $491=$2000
BYTE ARRAY
DL=[$70$70$70$46$C$20$41$1$20],
TEXT="NNNNNNNNNNNNNNNNNNNNtajemnice@atariNNNNNNNNNNNNNNNNNNNN"
BYTE
RTCLOCK=$14,
CH=$2FC
CARD SDLSTL=$230
PROC WAIT(BYTE FRAMES)
FRAMES==+RTCLOCK
WHILE FRAMES#RTCLOCK DO OD
RETURN
PROC MAIN()
SDLSTL=DL
WHILE CH=$FF DO
WAIT(5)
DL(4)==+1
IF DL(4)=$23+$C THEN DL(4)=$C FI
OD
GRAPHICS(0)
RETURN
SET $E=$2000
SET $491=$2000
BYTE ARRAY
DL=[$70$70$70$56$C$20$41$1$20],
TEXT="NNNNNNNNNNNNNNNNNNNNtajemnice@atariNNNNNNNNNNNNNNNNNNNN"
BYTE
RTCLOCK=$14,
CH=$2FC,
HSCROL=$D404
CARD SDLSTL=$230
PROC WAIT(BYTE FRAMES)
FRAMES==+RTCLOCK
WHILE FRAMES#RTCLOCK DO OD
RETURN
PROC MAIN()
BYTE I=$CA
SDLSTL=DL
WHILE CH=$FF DO
I=8
WHILE I DO
I==-1
HSCROL=I
WAIT(1)
OD
DL(4)==+1
IF DL(4)=$23+$C THEN DL(4)=$C FI
OD
GRAPHICS(0)
RETURN
SET $E=$2000
SET $491=$2000
BYTE ARRAY
DL=[$70$70$70$70$67$D$20$41$1$20],
TEXT="NNtejemnice@atariNNN"
BYTE
RTCLOCK=$14,
CH=$2FC,
VSCROL=$D405
CARD SDLSTL=$230
PROC WAIT(BYTE FRAMES)
FRAMES==+RTCLOCK
WHILE FRAMES#RTCLOCK DO OD
RETURN
PROC MAIN()
BYTE I=$CA
I=$F
SDLSTL=DL
WHILE CH=$FF DO
WHILE I DO
I==-1
VSCROL=I
WAIT(3)
OD
WAIT(50)
WHILE I<$F DO
I==+1
VSCROL=I
WAIT(2)
OD
OD
GRAPHICS(0)
RETURN
SET $E=$2A00
SET $491=$2A00
BYTE ARRAY
DL=[$70 $70 $70 $62 $21 $2A
$22 $22 $22 $22 $22 $22 $22 $22 $22 $22
$22 $22 $22 $22 $22 $22 $22 $22 $22 $22
$02 $41 0 $2A],
TEXT="NNNNNNNNNNNNtajemniceNNatariNNNNNNNNNNNN"
BYTE
RTCLOCK=$14,
CH=$2FC,
VSCROL=$D405
CARD SDLSTL=$230
PROC WAIT(BYTE FRAMES)
FRAMES==+RTCLOCK
WHILE FRAMES#RTCLOCK DO OD
RETURN
PROC MAIN()
BYTE
I1=$CA,
I2=$CB
CARD LMS=$2A04
I1=$17
SDLSTL=DL
WHILE I1 DO
I2=8
WHILE I2 DO
I2==-1
VSCROL=I2
WAIT(2)
OD
LMS==-$28
I1==-1
OD
GRAPHICS(0)
RETURN
PROC TEST=*(BYTE A,X,Y, STRING S)
A=X-Y
RETURN
PROC TEST(BYTE A,X,Y, STRING S)
A=X-Y
RETURN
PROC TEST(BYTE A,X,Y, CARD S)
A=X-Y
RETURN
PROC TEST(BYTE A,X,Y, CARD S)
A=X-Y
RETURN
2000: 00 BRK
2001: 00 BRK
2002: 00 BRK
2003: 00 BRK
2004: 00 BRK
2005: 4C 08 20 JMP $2008
2008: 20 29 9E JSR $9E29
200B: 00 BRK
200C: 20 04 38 JSR $3804
200F: AD 01 20 LDA $2001
2012: ED 02 20 SBC $2002
2015: 8D 00 20 STA $2000
2018: 60 RTS
2019: 60 RTS
PROC TEST=*(BYTE A,X,Y, CARD S)
A=X-Y
RETURN
2000: 38 SEC
2001: AD 00 20 LDA $2000
2004: ED 00 20 SBC $2000
2007: 8D 00 20 STA $2000
200A: 60 RTS
200B: 60 RTS
200C: 20 04 38 JSR $3804
200F: AD 01 20 LDA $2001
2012: ED 02 20 SBC $2002
2015: 8D 00 20 STA $2000
2018: 60 RTS
2019: 60 RTS
CARD FUNC SUM(BYTE A,B CARD C)
C==+(A+B)
RETURN (C)
PROC MAIN()
CARD RES
RES=SUM(2,4,1000)
RETURN
2000: 00 BRK
2001: 00 BRK
2002: 00 BRK
2003: 00 BRK
2004: 4C 07 20 JMP $2007
2007: 20 29 9E JSR $9E29
200A: 00 BRK
200B: 20 03 18 JSR $1803
200E: AD 00 20 LDA $2000
2011: 6D 01 20 ADC $2001
2014: 85 AE STA $AE ;LELNUM+1
2016: 18 CLC
2017: AD 02 20 LDA $2002
201A: 65 AE ADC $AE ;LELNUM+1
201C: 8D 02 20 STA $2002
201F: AD 03 20 LDA $2003
2022: 69 00 ADC #$00
2024: 8D 03 20 STA $2003
2027: AD 03 20 LDA $2003
202A: 85 A1 STA $A1 ;TSLNUM+1
202C: AD 02 20 LDA $2002
202F: 85 A0 STA $A0 ;TSLNUM
2031: 60 RTS
2032: 00 BRK
2033: 00 BRK
2034: 4C 37 20 JMP $2037
2037: A9 03 LDA #$03
2039: 85 A3 STA $A3 ;MVLNG+1
203B: A0 E8 LDY #$E8
203D: A2 04 LDX #$04
203F: A9 02 LDA #$02
2041: 20 04 20 JSR $2004
2044: A5 A1 LDA $A1 ;TSLNUM+1
2046: 8D 33 20 STA $2033
2049: A5 A0 LDA $A0 ;TSLNUM
204B: 8D 32 20 STA $2032
204E: 60 RTS
204F: 60 RTS
CARD FUNC SUM=*(BYTE A,B CARD C)
C==+(A+B)
RETURN (C)
PROC MAIN()
CARD RES
RES=SUM(2,4,1000)
RETURN
2000: 18 CLC
2001: AD 00 20 LDA $2000
2004: 6D 00 20 ADC $2000
2007: 85 AE STA $AE ;LELNUM+1
2009: 18 CLC
200A: AD 00 20 LDA $2000
200D: 65 AE ADC $AE ;LELNUM+1
200F: 8D 00 20 STA $2000
2012: AD 01 20 LDA $2001
2015: 69 00 ADC #$00
2017: 8D 01 20 STA $2001
201A: AD 01 20 LDA $2001
201D: 85 A1 STA $A1 ;TSLNUM+1
201F: AD 00 20 LDA $2000
2022: 85 A0 STA $A0 ;TSLNUM
2024: 60 RTS
2025: 00 BRK
2026: 00 BRK
2027: 4C 2A 20 JMP $202A
202A: A9 03 LDA #$03
202C: 85 A3 STA $A3 ;MVLNG+1
202E: A0 E8 LDY #$E8
2030: A2 04 LDX #$04
2032: A9 02 LDA #$02
2034: 20 00 20 JSR $2000
2037: A5 A1 LDA $A1 ;TSLNUM+1
2039: 8D 26 20 STA $2026
203C: A5 A0 LDA $A0 ;TSLNUM
203E: 8D 25 20 STA $2025
2041: 60 RTS
2042: 60 RTS
SET $E=$2000
SET $491=$2000
CARD RES=[0]
PROC ADD=*(BYTE A,B)
RES=A+B
RETURN
PROC MAIN()
ADD(10,20)
PRINTCE(RES)
RETURN
;------------------------------
2000: 00 BRK
2001: 00 BRK
2002: 18 CLC
2003: AD 02 20 LDA $2002
2006: 6D 02 20 ADC $2002
2009: 8D 00 20 STA $2000
200C: A9 00 LDA #$00
200E: 8D 01 20 STA $2001
2011: 60 RTS
2012: 4C 15 20 JMP $2015 ;MAIN
2015: A2 14 LDX #$14
2017: A9 0A LDA #$0A
2019: 20 02 20 JSR $2002
201C: AE 01 20 LDX $2001
201F: AD 00 20 LDA $2000
2022: 20 1C A2 JSR $A21C
2025: 60 RTS
2026: 60 RTS
SET $E=$2000
SET $491=$2000
BYTE COLBK=$D01A
PROC SET_COLBK=*(BYTE COLOUR)
COLBK=COLOUR
RETURN
PROC MAIN()
SET_COLBK(10)
RETURN
2000: AD 00 20 LDA $2000
2003: 8D 1A D0 STA $D01A ;COLBK
2006: 60 RTS
2007: 4C 0A 20 JMP $200A
200A: A9 0A LDA #$0A
200C: 20 00 20 JSR $2000
200F: 60 RTS
SET $E=$2000
SET $491=$2000
PROC SET_COLBK=*(BYTE COLOUR)[$8D$1A$D0$60]
PROC MAIN()
SET_COLBK(10)
RETURN
2000: 8D 1A D0 STA $D01A ;COLBK
2003: 60 RTS
2004: 4C 07 20 JMP $2007
2007: A9 0A LDA #$0A
2009: 20 00 20 JSR $2000
200C: 60 RTS
SET $E=$2000
SET $491=$2000
PROC SET_COLBK=*(BYTE COLOUR,A,B,C)[$8D$1A$D0$60]
PROC MAIN()
SET_COLBK(10,1,2,3)
RETURN
2000: 8D 1A D0 STA $D01A ;COLBK
2003: 60 RTS
2004: 4C 07 20 JMP $2007
2007: A9 03 LDA #$03
2009: 85 A3 STA $A3 ;MVLNG+1
200B: A0 02 LDY #$02
200D: A2 01 LDX #$01
200F: A9 0A LDA #$0A
2011: 20 00 20 JSR $2000
2014: 60 RTS