CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 00:22:37 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=d6878b717a7ec467967a6d785aa800d24d8b1a0bd5c321aacfe63050f6f458f5a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22liUQUq7-Ncl9eO3kqOCGOekaMTgM8qMS%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2719f5f7b343c-BLR
ItoA 16 bit - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update in: https://pastebin.com/b6i5JTBf
- *=$0801
- BYTE $0B, $08, $0A, $00, $9E, $32, $30, $36, $31, $00, $00, $00
- ;---------------------------------
- Example
- lda #$49
- sta lobyte
- lda #1
- sta hibyte
- jsr _ItoA ; converts Int16 to String
- jsr _trimnum ; trims leading spaces
- ; prints trimmed string
- lda #<CnvTrm
- ldy #>CnvTrm
- jsr $ab1e
- lda #13
- jsr $ffd2
- ; prints untrimmed string
- lda #<CnvStr
- ldy #>CnvStr
- jsr $ab1e
- rts
- ;-------------------------------
- ; Converts a 16bit number to BCD
- ;-------------------------------
- BINBCD16
- SED ; Switch to decimal mode
- LDA #0 ; Ensure the result is clear
- STA bcd+0
- STA bcd+1
- STA bcd+2
- LDX #16 ; The number of source bits
- CNVBIT
- ASL lobyte ; Shift out one bit
- ROL hibyte
- LDA bcd+0 ; And add into result
- ADC bcd+0
- STA bcd+0
- LDA bcd+1 ; propagating any carry
- ADC bcd+1
- STA bcd+1
- LDA bcd+2 ; ... thru whole result
- ADC bcd+2
- STA bcd+2
- DEX ; And repeat for next bit
- BNE CNVBIT
- CLD ; Back to binary
- rts ; All Done.
- ;-------------------------------
- ; Converts a 16bit unsigned number into string
- ;-------------------------------
- ;
- ; Call with 16 bit number in lobyte/hibyte
- ;
- ;-------------------------------
- _ItoA
- jsr BinBcd16
- ;lda bcd+2
- and #$0f
- ora #$30
- sta CnvStr+0
- lda bcd+1
- and #$0f
- ora #$30
- sta CnvStr+2
- lda bcd+1
- lsr
- lsr
- lsr
- lsr
- ora #$30
- sta CnvStr+1
- lda bcd+0
- and #$0f
- ora #$30
- sta CnvStr+4
- lda bcd+0
- lsr
- lsr
- lsr
- lsr
- ora #$30
- sta CnvStr+3
- ; rts ; decomment to avoid stripping leading 0s
- ldx #0 ;remove 0s at beginning
- _rem0 lda CnvStr,x
- cmp #$30
- bne _rts
- lda #$20 ;put a space instead
- sta CnvStr,x
- inx
- cpx #$5
- bne _rem0
- _rts rts
- _trimnum
- ldy #0
- _trmlp lda CnvStr,x
- sta CnvTrm,y
- beq _rts
- inx
- iny
- jmp _trmlp
- bcd byte 0,0,0
- lobyte byte 0
- hibyte byte 0
- CnvStr byte 0,0,0,0,0,0
- CnvTrm byte 0,0,0,0,0,0
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Profit Method⭐⭐
Java | 1 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ U
JavaScript | 3 sec ago | 0.25 KB
-
📝 EASY MONEY GUIDE ✅ Working
JavaScript | 4 sec ago | 0.24 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 7 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ C
JavaScript | 7 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ W
JavaScript | 12 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $500 IN 15 MIN⭐⭐
Java | 13 sec ago | 0.10 KB
-
📌 ChangeNOW Exploit
JavaScript | 14 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand