home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tajemnice Atari 3
/
Tajemnice_Atari_Nr_03_1992_Avalon_pl.atr
/
poker.asm
< prev
next >
Wrap
Assembly Source File
|
2023-02-26
|
3KB
|
1 lines
* TA POKER autor: JBW¢* (c) 1992 Tajemnice ATARI¢¢¢ opt %010101¢¢¢*--- procedury w ROM¢¢afp equ $D800¢fpi equ $D9D2¢ciov equ $E456¢¢¢*--- rejestry pakietu FP¢¢fr0 equ $d4¢cix equ $f2¢inbuff equ $f3¢¢¢*--- system¢¢runad equ $2E0¢initad equ $2E2¢dosrun equ $A¢dosini equ $C¢iocb equ $340¢io_com equ iocb+2¢io_sta equ iocb+3¢io_adr equ iocb+4 (2)¢io_len equ iocb+8 (2)¢io_mod equ iocb+10¢io_aux equ iocb+11¢¢¢*--- stale¢¢chn0 equ 0¢gett equ 5¢putt equ 9¢getb equ 7¢putb equ 11¢eol equ 155¢¢¢*--- strona 0¢¢byte equ $cb¢addr equ $cc¢word equ $ce¢¢¢*--- numery komunikatow¢¢nul_m equ 0¢tit_m equ 1¢adr_m equ 2¢byt_m equ 3¢¢¢ org $8000¢¢main jsr init¢* glowna petla¢loop ldx #nul_m¢ jsr dsp_msg¢* pobierz adres¢ ldx #adr_m¢ jsr get_text¢ bmi loop¢* pusty wiersz?¢ dec io_len,x¢ beq quit koniec¢* dekoduj adres¢ jsr deco¢ sta addr¢ sty addr+1¢* pobierz bajt¢ ldx #byt_m¢ jsr get_text¢ bmi loop¢* pusty wiersz?¢ dec io_len,x¢ beq loop od nowa¢* dekoduj bajt¢ jsr deco¢* wstaw bajt pod adres¢ ldx #0¢ sta (addr,x)¢* jeszcze raz¢ jmp loop¢* powrot do DOS-u¢quit jmp (dosrun)¢¢¢*--- wypisz tekst¢¢dsp_msg equ *¢* odszukaj tekst nr X¢ ldy #0¢fm0 dex¢ bmi mout¢fmes lda data,y¢ iny¢ cmp #eol¢ bne fmes¢ beq fm0 (jmp)¢* wypisz¢mout txa¢ ldx #chn0¢ sta io_len,x¢ clc¢ tya¢ adc dtaa¢ sta io_adr,x¢ lda #0¢ sta io_len+1,x¢ adc dtaa+1¢ sta io_adr+1,x¢ lda #putt¢ sta io_com,x¢ jmp ciov¢¢¢*--- pobierz tekst¢¢get_text jsr dsp_msg¢ ldx #chn0¢ lda txta¢ sta io_adr,x¢ lda txta+1¢ sta io_adr+1,x¢ sta io_len+1,x¢ lda #gett¢ sta io_com,x¢ jmp ciov¢¢¢*--- dekodowanie¢¢deco lda txta¢ sta inbuff¢ lda txta+1¢ sta inbuff+1¢ lda #0¢ sta cix¢ jsr afp¢ jsr fpi¢ lda fr0¢ ldy fr0+1¢ rts¢¢¢*--- procedura poczatkowa¢¢init ldx #tit_m¢ jmp dsp_msg¢¢¢*--- znak konca¢¢ brk¢¢¢*--- dane adresowe¢¢dtaa dta a(data)¢txta dta a(text)¢ dta a(0)¢¢¢*--- dane¢¢data equ *¢¢ dta b(eol)¢ dta c' TA POKER '*,b(eol)¢ dta c'Address:',b(eol)¢ dta c'Byte:',b(eol)¢¢text org *+120¢¢¢*--- adres uruchomienia¢¢ org runad¢ dta a(main)¢¢ end¢