Click here to Skip to main content
15,888,351 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: My first ASM Pin
Private Dobbs9-Feb-21 21:53
Private Dobbs9-Feb-21 21:53 
GeneralRe: My first ASM Pin
raddevus10-Feb-21 2:36
mvaraddevus10-Feb-21 2:36 
GeneralRe: My first ASM Pin
Private Dobbs10-Feb-21 3:21
Private Dobbs10-Feb-21 3:21 
GeneralRe: My first ASM Pin
Rage9-Feb-21 22:14
professionalRage9-Feb-21 22:14 
GeneralRe: My first ASM Pin
raddevus10-Feb-21 2:38
mvaraddevus10-Feb-21 2:38 
GeneralRe: My first ASM Pin
Stuart Dootson10-Feb-21 3:19
professionalStuart Dootson10-Feb-21 3:19 
GeneralRe: My first ASM Pin
raddevus10-Feb-21 4:15
mvaraddevus10-Feb-21 4:15 
GeneralRe: My first ASM Pin
James Curran10-Feb-21 4:19
James Curran10-Feb-21 4:19 
ASM
    ld   hl, 3c00h
l1: ld   a, (hl)
    xor  a, 0BFh
    ld   (hl), a
    inx   hx
    ld    a, h
    cmp   40h
    jne   l1
    ret

My first assembler subroutine, in Z-80assembler, for the TRS-80. First written circa 1979 and reprinted from memory. Now the tricky part:
21 00 3C
76
EE BF
77
23
7C
FE 40
20 F5
C9

That's my best guess to the machine codes for that. (It steps through the monochrome graphics screen, inverting the bit, changing black->white, white->black on the image.)

UPDATE: I just googled it. The correct machine code would be:
21 00 3C
7E      ; funny thing. I wrote 7E on the scrap paper I figured it out on, then wrote 76 here.
EE BF
77
23
7C
FE 40
20 F3   ; relative jump starts counting from the address of NEXT op code.  
C9
Truth,

James


modified 10-Feb-21 10:40am.

GeneralRe: My first ASM Pin
raddevus10-Feb-21 5:10
mvaraddevus10-Feb-21 5:10 
GeneralRe: My first ASM Pin
Dan Sutton10-Feb-21 4:53
Dan Sutton10-Feb-21 4:53 
GeneralRe: My first ASM Pin
raddevus10-Feb-21 5:11
mvaraddevus10-Feb-21 5:11 
GeneralRe: My first ASM Pin
Martin ISDN11-Feb-21 6:18
Martin ISDN11-Feb-21 6:18 
GeneralRe: My first ASM Pin
glennPattonWork310-Feb-21 4:55
professionalglennPattonWork310-Feb-21 4:55 
GeneralRe: My first ASM Pin
Member 165282710-Feb-21 8:09
Member 165282710-Feb-21 8:09 
GeneralRe: My first ASM Pin
fatman4510-Feb-21 10:32
professionalfatman4510-Feb-21 10:32 
GeneralRe: My first ASM Pin
raddevus10-Feb-21 13:09
mvaraddevus10-Feb-21 13:09 
GeneralRe: My first ASM Pin
Martin ISDN11-Feb-21 6:10
Martin ISDN11-Feb-21 6:10 
GeneralThought of the Day Pin
OriginalGriff9-Feb-21 4:35
mveOriginalGriff9-Feb-21 4:35 
GeneralRe: Thought of the Day Pin
jeron19-Feb-21 5:09
jeron19-Feb-21 5:09 
GeneralRe: Thought of the Day Pin
Kris Lantz9-Feb-21 5:40
professionalKris Lantz9-Feb-21 5:40 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer9-Feb-21 5:44
professionalDaniel Pfeffer9-Feb-21 5:44 
GeneralRe: Thought of the Day Pin
W Balboos, GHB9-Feb-21 5:47
W Balboos, GHB9-Feb-21 5:47 
GeneralRe: Thought of the Day Pin
Eddy Vluggen9-Feb-21 8:50
professionalEddy Vluggen9-Feb-21 8:50 
GeneralRe: Thought of the Day Pin
Greg Utas9-Feb-21 9:23
professionalGreg Utas9-Feb-21 9:23 
GeneralRe: Thought of the Day Pin
  Forogar  10-Feb-21 3:18
professional  Forogar  10-Feb-21 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.