Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6955303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:43:08+00:00 2026-05-27T14:43:08+00:00

I am very new to assembly, and I’m trying to build a small program.

  • 0

I am very new to assembly, and I’m trying to build a small program. I can’t figure out how to insert a line break in assembly using the Easy68k. For example, I am starting to write basic black jack simulator, and I need to do a line break after greeting the first player. I tried incorporating “\n” into the variable declaration, but it just prints out as if it were part of the text.

According to the Easy 68K Help I/O section, I can use
“LF EQU $0A New line (line feed)” but I have no idea how to implement this.

START   ORG        $400             ; Start of program area
    CLR.L      D0               ; Clear D0
    CLR.L      D1               ; Clear D1
    CLR.L      D2               ; Clear D2
    CLR.L      D3               ; Clear D3
    CLR.L      D4               ; Clear D4
    CLR.L      D5               ; Clear D5
    CLR.L      D6               ; Clear D6
    MOVE.L     playerTotal, D2  ; Store Player total in D1
    MOVE.L     card, D3         ; Store current card in D2
    MOVE.B     playerAce, D4    ; Store number of aces player has in D3
    MOVE       #14, D0      
    LEA        playerGreeting, A1   ; Load Player Greeting in A1
    TRAP       #15              ; Display Player Greeting
* insert line break     
    STOP       #$2700  ; Stop execution

        ORG         $1000   ;Start of data area
playerTotal DS.L        1       ; Save 1 byte of memory for playerTotal
dealerTotal DS.L        1       ; Save 1 byte of memory for dealerTotal
card        DC.L        5       ; Save 1 byte of memory for card dealt
keepPlaying DS.B        1       ; Save 1 byte of memory for Play again value
playerAce   DS.B        1       ; Save 1 byte of memory to track player Aces
playerGreeting  DC.B        'Hello Player 1!', 0    ; Message 

                LF        EQU       $0A
                END     START                  ; End of program and entry point
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:43:09+00:00Added an answer on May 27, 2026 at 2:43 pm

    Try this:

    CR EQU $0D
    LF EQU $0A
    playerGreeting  DC.B        'Hello Player 1!',CR,LF,0    ; Message
    

    This will insert a carriage return (CR) and line feed (LF) after your message. Basically it tacks on two additional characters to your output string before the null terminator (0).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am very new to generics and trying to implement it. How can i
Very new to JQuery and MVC and webdevelopment over all. I'm now trying to
I still very new using Subversion. Is it possible to have a working copy
I need to implement a very small plugin architecture.I am new to MEF so
I'm trying to write a program in assembly and make the resulting executable as
I am using Moq (which I am very new too as well as TDD
I'm trying out my very first project with Fluent NHibernate (any NHibernate flavor for
I am very new to Assembly language . I was reading about MIPS architecture
I am very new to Assembly language . I was reading about MIPS architecture
I am very new to Maven and running into a problem that I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.