Results 1 to 14 of 14

Thread: my first program

  1. #1

  2. #2
    Lively Member homer13j's Avatar
    Join Date
    Nov 2003
    Location
    Where the dirt bikes and ATVs play
    Posts
    80

    Re: my first program

    Nice. What will be your next project?
    "Bones heal. Chicks dig scars. Pain is temporary. Glory is forever." - Robert Craig "Evel" Knievel
    “Leave me alone, I know what I’m doing.” - Kimi Raikkonen

  3. #3
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,339

    Re: my first program

    My first NES program done in 6502 assembly

    Code:
      .inesprg 1   ; 1x 16KB PRG code
      .ineschr 1   ; 1x  8KB CHR data
      .inesmap 0   ; mapper 0 = NROM, no bank swapping
      .inesmir 1   ; background mirroring
      
    
    ;;;;;;;;;;;;;;;
    
        
      .bank 0
      .org $C000 
    RESET:
      SEI          ; disable IRQs
      CLD          ; disable decimal mode
      LDX #$40
      STX $4017    ; disable APU frame IRQ
      LDX #$FF
      TXS          ; Set up stack
      INX          ; now X = 0
      STX $2000    ; disable NMI
      STX $2001    ; disable rendering
      STX $4010    ; disable DMC IRQs
    
    vblankwait1:       ; First wait for vblank to make sure PPU is ready
      BIT $2002
      BPL vblankwait1
    
    clrmem:
      LDA #$00
      STA $0000, x
      STA $0100, x
      STA $0200, x
      STA $0400, x
      STA $0500, x
      STA $0600, x
      STA $0700, x
      LDA #$FE
      STA $0300, x
      INX
      BNE clrmem
       
    vblankwait2:      ; Second wait for vblank, PPU is ready after this
      BIT $2002
      BPL vblankwait2
    
    
      LDA #%10000000   ;intensify blues
      STA $2001
    
    Forever:
      JMP Forever     ;jump back to Forever, infinite loop
      
     
    
    NMI:
      RTI
     
    ;;;;;;;;;;;;;;  
      
      
      
      .bank 1
      .org $FFFA     ;first of the three vectors starts here
      .dw NMI        ;when an NMI happens (once per frame if enabled) the 
                       ;processor will jump to the label NMI:
      .dw RESET      ;when the processor first turns on or is reset, it will jump
                       ;to the label RESET:
      .dw 0          ;external interrupt IRQ is not used in this tutorial
      
      
    ;;;;;;;;;;;;;;  
      
      
      .bank 2
      .org $0000
      .incbin "mario.chr"   ;includes 8KB graphics file from SMB1
    It just makes a blue background but it freaking works

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: my first program

    My first program that made it big:

    Code:
    print "Hello World";

  5. #5

    Thread Starter
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: my first program

    I was about 6 years old 1989 and the program was called pip i believe.


  6. #6
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: my first program

    Repeat 100 million times. How long did that take to run in 1989. Seem's like it should still be going.

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    Re: my first program

    Back in those days, or even earlier, there weren't all that many computers on the market, and not all that much computer skill out there. However, all IBM PC and PC clones that came with DOS also came with some flavor of BASIC. So, I'd take the display model and write something like:

    10 Print "Help, I'm trapped in a computer!"
    20 Goto 10

    and run it. As soon as the lines scrolled off the screen you'd think it would just look frozen, but since those screens tended to be pretty much crap in those days, it would flicker a bit as it sat there.

    I figured that it would be a little test for the sales staff to see whether or not they knew enough about what they were selling to even stop a perpetual loop.
    My usual boring signature: Nothing

  8. #8
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,902

    Re: my first program

    Easy. Unplug it.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  9. #9

    Thread Starter
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: my first program

    Quote Originally Posted by passel View Post
    Repeat 100 million times. How long did that take to run in 1989. Seem's like it should still be going.
    Ha did not notice that.

  10. #10
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: my first program

    Quote Originally Posted by ident View Post
    Can't find this on Github!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Not open source!!!!!!!!!!!

    Arduino!! Arduino!! Arduino!! Arduino!! Arduino!! Arduino!! Arduino!! Arduino!! Arduino!!
    I don't live here any more.

  11. #11
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,760

    Re: my first program

    I saw where you spelled your name SaM. You need to go back to your 6 year old self and remind him about how important casing is, especially in C based languages! Just kidding, I love seeing old stuff like this.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: my first program

    Github always sounds like a coffee shop for losers.

  13. #13
    Lively Member
    Join Date
    Mar 2015
    Posts
    104

    Re: my first program

    My first program was making a tree fractal using LOGO. AH that was many years ago and counting.

    To think how the world has changed!

  14. #14
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: my first program

    Every time I get stopped on the high street by a driver asking for directions, I find myself replying in LOGO commands.

    "Ok, do a one-eighty right here, drive about 400 yards, take a left and then second right and uhh, ask someone else."
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width