This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEVICE ZXSPECTRUM48 | |
OPT reset --zxnext=cspect --syntax=abfw | |
ORG $8000 | |
start: | |
;; FIRST test: black border configured into default transparency fallback colour, inkmask 7 | |
; black border | |
xor a | |
out (254),a | |
; configure the NextULA palette (inkmask 7, select ULA palette for write, display first pals, enable NextULA mode) | |
nextreg $42,$07 ,, $43,%0'000'0'0'0'1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; syntax for https://github.com/z00m128/sjasmplus/releases assembler | |
OPT --syntax=abfw --zxnext | |
;;---------------------------------------------------------------------------------------- | |
;; reads nextreg in A into A | |
ReadNextReg: | |
; Input | |
; A = nextreg to read | |
; Output: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LimitHlValue: | |
; In: HL = value to be clamped to -0x100 .. +0x100 | |
; Out: HL = clamped value | |
; Uses: A + flags | |
; (this is not mathematically correct, values 0x7F?? clamp to -0x100, for performance reasons) | |
ld a,h | |
inc a | |
sra a ; will be 0 for -256..+255 (+256 will get "clamped") | |
ret z | |
ld hl,0x100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OUTPUT "ECHO" | |
ORG 8192 | |
Start: ex de,hl | |
ld a,d | |
or e | |
ret z ; DE == 0, no pointer to arguments | |
Print: ld a,(de) | |
or a | |
ret z ; zero byte end of command line | |
cp 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REAL_ORG = #3c51 | |
DICT_BEGIN = #3c49 | |
DATA_REG = 129 | |
CONTROL_REG = 128 | |
RTS_LOW = #16 | |
RTS_HIGH = #56 | |
MACRO CHECKSUM start? | |
opt push listoff ; disable listing while calculating checksum | |
.ptr = start? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFINE USE_DMA_TO_CLEAR_SCREEN ; comment out to get LDIR clear version | |
DEFINE USE_DOUBLE_BUFFERING ; comment out to see single-buffer redraw issues | |
DEVICE ZXSPECTRUMNEXT | |
BORDER MACRO color? | |
ld a,color? | |
out (254),a | |
ENDM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; show how 8-bit color values RRRGGGBB are being extended to full 9-bit definition | |
; displays blue squares with 8bit blue part 0, 1, 2, 3 (all possible blue shades in 8b) | |
; and under them the 9bit defined blues as %000, %011, %101, %111 (how 8b extends to 9b) | |
; assembling: sjasmplus color8vs9b.asm ( https://github.com/z00m128/sjasmplus ) | |
DEVICE ZXSPECTRUMNEXT : OPT --syntax=abfw | |
ORG $8000 | |
start: | |
di | |
ld a,7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; to assemble: sjasmplus asterisk_vs_exclamation_char.asm | |
DEVICE ZXSPECTRUM48,31999 : OPT --zxnext | |
ORG $8000 | |
font: | |
ASSERT 0 == high(font) % 8 ; must reside at aligned-enough address to fit this | |
ds '!'*8,0 ; don't bother to define other chars, go to exclamation mark | |
dg ---##--- | |
dg ---##--- | |
dg ---##--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Authors: Omega, Ped7g, Baze ; (C) 2021 ; license: https://opensource.org/licenses/MIT | |
; Z80 assembly, syntax for sjasmplus: https://github.com/z00m128/sjasmplus | |
; to assemble run: sjasmplus omega_fades.asm | |
OPT --syntax=abf | |
DEVICE ZXSPECTRUM48,31999 | |
ORG $8000 | |
;------------------------------------------------------------------------------ | |
; ULA attributes "fade out" effect, going through PAPER/INK values, | |
; decrements them (individually) by 1 every iteration (call of routine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Authors: Omega, Ped7g, Baze ; (C) 2021 ; license: https://opensource.org/licenses/MIT | |
; Z80 assembly, syntax for sjasmplus: https://github.com/z00m128/sjasmplus | |
; to assemble run: sjasmplus omega_fades_2.asm | |
OPT --syntax=abf | |
DEVICE ZXSPECTRUM48,31999 | |
ORG $8000 | |
; uncomment and set to available SCR file to run the effect on ZX screen image (6912 bytes) | |
; DEFINE SCR_FILE "diver - Mercenary 4. The Heaven's Devil (2014) (Forever 2014 Olympic Edition, 1).scr" |
OlderNewer